Skip to content
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

feat(@nestjs/bull): Allow overriding the onApplicationShutdown behaviour #2070

Closed

Conversation

akshatflx
Copy link

Allows customising the onApplicationShutdown behaviour by providing a callback in the BullModuleOptions. For eg. if someone doesn't want to close() the queues instead just pause(true) them

Resolves #2069

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

Issue Number: #2069

What is the new behavior?

In BullModuleOptions one can provide a callback function for onApplicationShutdown, which gets the Bull.Queue instance on which people can call queue.pause(true) or any other function they need to.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Allows customising the onApplicationShutdown behaviour by providing a
callback in the `BullModuleOptions`. For eg. if someone doesn't want to
`close()` the queues instead just `pause(true)` them

Resolves nestjs#2069
@akshatflx
Copy link
Author

Just realised there are several mistakes in this PR, I'll try to create a new one soon.

@akshatflx akshatflx closed this Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

On application shutdown it closes all the queues. If any active job is creating more jobs it will fail.
1 participant