Conversation
|
Just happen to be learning and browsing this PR and I got question about the worker.ts file. Is the idea that there would be a separate build for the workers that only runs the jobs? What's the reason behind that? That means you're adding a job to the queue in one app and processing the queue in another app, and that works because the data just all lives in redis? |
A separate worker file is designed to decouple the Worker from the Server. For production environments, we put some long tasks in the background, so we need a separate worker file to ensure that it is a separate process. The communication between Server and Worker is done entirely through Redis. |
|
@marcjulian What do you think about this? This PR has been pending for a long time. 🤔 |
|
@marcjulian I think it should be merged. |
Change
Why add
I think it's essential to use message queues in a production environment, so I've added a usage of Bull and I'm using it myself in a production environment, if you feel the need to add it to the main branch then I'll refine the documentation section and the testing section.
How to use