Replies: 3 comments
-
Willkommen @kkretsch! Out of the box, Node Resque doesn't support worker rate-limiting. Since this is a queue system, the workers, just try to work one job at a time until they are done. Here are some ideas:
Let me know if you want to talk strategy more! If you do end up writing a rate-limiting plugin, it would be great to get that checked back into node-resque so others can use it! |
Beta Was this translation helpful? Give feedback.
-
Thanks for the ideas. My case is the mentioned API rate limit I would catch in some cases. Currently I just summarize the events per job worker run when seeing I have more in the queue. Next I have to try the real limiting stuff like you suggested. |
Beta Was this translation helpful? Give feedback.
-
Good luck! I'm going to move this to a discussion rather than an issue. Keep us posted! |
Beta Was this translation helpful? Give feedback.
-
I'm somehow stuck in configuring the queues. I currently get on occasion a bunch of jobs into the queue in the amount of up to hundreds and need to limit the worker running the jobs to let's say one job per second.
Is there any elegant way to do this or do I need to write some plugin for this?
Just adding a plain sleep into the end of the job function doesn't help, because it either consumes valuable time running in a loop or if I use some async way the jobs suddenly run in parallel.
Beta Was this translation helpful? Give feedback.
All reactions