You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suggest adding pools and workers for them, possibly a separate library.
This can be useful, for example, when you need to complete tasks in different ways; for this, separate workers are needed. Or, for example, there are tasks to get information from the API, but there is a limit, we can add another worker with a separate API key.
I already made a fork and tried to implement workers, it works. but it seems to me it is better to rewrite everything as a separate library.
I also suggest storing information in the queue not only in functions but also in the payload. For example, queue.add('https://...') and the worker itself decides how to process this information, this makes it possible to easily view the queue, serialize/deserialize it, for example for storing in the db.
In general, you can write anything to the queue, be it a function, be it any data in a free form and structure. And the worker will decide how to process it.
I suggest adding pools and workers for them, possibly a separate library.
This can be useful, for example, when you need to complete tasks in different ways; for this, separate workers are needed. Or, for example, there are tasks to get information from the API, but there is a limit, we can add another worker with a separate API key.
I already made a fork and tried to implement workers, it works. but it seems to me it is better to rewrite everything as a separate library.
Some ideas:
The text was updated successfully, but these errors were encountered: