-
-
Notifications
You must be signed in to change notification settings - Fork 147
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
Stopping pg-boss gracefully does not wait until stop timeouts #421
Comments
My fault. I still had a timeout in the shutdown phase. The bug is still valid. |
I was able to workaround this by await boss.stop(stopOptions);
await new Promise((resolve) => {
boss.once('stopped', () => resolve(null));
});
fastify.log.info('PgBoss shutdown complete'); I think it would be more intuitive if this is the default behavior of |
PRs are always welcome. I think it should be opt-in via as a new option on stop(). Thanks! |
What's the reason for passing it onto the next cycle here? + why is a delay of 1000ms required? |
@timgit friendly ping. |
Hold off on the PR. v10 will include this |
@timgit thank you. Any eta? |
Interested in the beta? |
Sure |
Hi, it looks like pg-boss does not respect
graceful
nortimeout
property. I have a simple worker that needs at least 5 seconds to finish. OnSIGTERM
I clean up all my server resources butboss.stop
does not block until the max timeout of 30s is over.The text was updated successfully, but these errors were encountered: