W
Wasp-lang3w ago
VS

Web workers

Is there anything I need to take into account with wasp about creating a web worker?
3 Replies
kapa.ai
kapa.ai3w ago
Hi @Adam. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- I apologize, but there seems to be a misunderstanding in your question. Wasp does not directly support web workers, which are a browser-side technology. Instead, Wasp provides support for background jobs on the server-side. Wasp offers functionality for background jobs, which are executed on the server, not in the browser like web workers. These background jobs in Wasp are designed for tasks that need to run asynchronously or on a schedule, separate from the main request-response cycle of your web application. Here are some key points about Wasp's background jobs: 1. Wasp uses a job system that persists between server restarts, can be retried if they fail, can be delayed, and can have recurring schedules Recurring Jobs (https://wasp-lang.dev/docs/advanced/jobs). 2. You can define jobs in your .wasp file and implement them in your server-side code Job Definition and Usage (https://wasp-lang.dev/docs/advanced/jobs#job-definition-and-usage). 3. Jobs in Wasp are executed on the server, not in the browser, so they have access to server-side resources like databases. If you need to perform background tasks in the browser, you would need to implement web workers separately in your client-side JavaScript code. Wasp doesn't provide specific features for browser-side web workers. If you have any questions about Wasp's background jobs or other server-side features, feel free to ask! ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Adam, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
martinsos
martinsos2w ago
@Adam I am guessing you were interested in PWA web worker, not jobs? If so, check out this issue, it says how to set it up: https://github.com/wasp-lang/wasp/issues/1117
GitHub
Add support for PWA in Wasp · Issue #1117 · wasp-lang/wasp
PWAs (Progressive Web Apps) give you a faster, more reliable, and more engaging version of your website or eCommerce store. PWAs can do most things that native apps can do, such as operate offline,...
VS
VSOP2w ago
Ah this is awesome! Didn't know thank you!
Want results from more Discord servers?
Add your server