-
Notifications
You must be signed in to change notification settings - Fork 91
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
Give ability to disable job processing in BullModule.forRoot
method
#2017
Comments
What about not importing |
@kamilmysliwiec will the web server still be able to produce messages if BullModule is not initialised at all? |
@kamilmysliwiec sorry I didn't notice your answer, the concern is as @jarPotato states it that I still want to be able to send messages, I just want to disable the processing. Currently our workaround is that we gathered all listeners/processors classes in a single module, that is imported conditionally based on an environment variable. The issue with this pattern is that it's quite easy to accidentally import a listener/processor in the wrong module (or fail to catch this in a review), and thus have the wrong instances (web instead of workers) process the jobs. |
Is there an existing issue that is already proposing this?
Is your feature request related to a problem? Please describe it
In our architecture, we have two types of "applications", that share the same code:
We would like to be able disable job processing on some instances only.
Describe the solution you'd like
In
BullModule.forRoot
method, have adisabled
prop, to disable the processing of jobs on this instance.Teachability, documentation, adoption, migration strategy
No response
What is the motivation / use case for changing the behavior?
Be able to easily disable processing.
The text was updated successfully, but these errors were encountered: