-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Queue#run fires a processStalledJobs loop when concurrency is 0 #327
Comments
While I can argue that calling |
can you provide more information regarding the issue in |
It's the issue described here: #257. So |
Fixed in #359 |
Looks like #359 was merged so this can be closed? |
I noticed this with my use case, where the concurrency value is set through an environment variable, this way you can have a service running on many instances with configurable concurrency values on each of them. A simple way to prevent a worker from processing jobs is by setting concurrency to
0
when it's needed.However, setting the concurrency value to 0 by calling
queue.process(0, myJobHandler)
has the side effect of always running aprocessStalledJobs
loop, this means that a worker that is not intended to run any jobs will run jobs through theprocessStalledJobs
loop, as a side note,processStalledJobs
currently has a flaw where it also processes fresh jobs, not only stalled ones.The text was updated successfully, but these errors were encountered: