-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
Workers with wildcard queue will find new queues #413
Conversation
if (!this.running) { | ||
return; | ||
} | ||
if (!this.running) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my personal preference is never to do such single line code "optimizations":
- ...
- using consistent style
- inexperienced developer may be adding extra code that they think is grouped by condition but really is just standalone statement
- if (!this.running) return;
+ if (!this.running) console.log("running"); return;
I think the documentation should be updated, that there are some drawbacks using "*" queue:
|
Awesome! Please submit a pull request with that language! |
this should have been minor version not patch version according to semver. |
Interesting! I view this as a bug that was fixed. Folks assumed that * would find new queues, yourself included. Aren't bugfixes to be patches? |
Seems to me a new feature that "*" would pick up new queues without restarting application :) also, I never used this feature, I stumbled on it when doing code-review of this project. |
If
worker.queues = ['*']
, this PR adds functionality to re-scan the list of queues that exist before everyworker#sleep
. In this way, if the worker has no jobs to perform in the queues it knows about, it will check for new queues.closes #412