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

Worker shutdown behaviour #93

Open
aminalaee opened this issue Sep 14, 2024 · 2 comments
Open

Worker shutdown behaviour #93

aminalaee opened this issue Sep 14, 2024 · 2 comments

Comments

@aminalaee
Copy link

Thanks for the library.
This is more of a question but I couldn't find a better place for it.

What happens to the buffered tasks in case of a shutdown (like sending a signal to kill a pod)? Do they go back into the queue?

@clokep
Copy link
Owner

clokep commented Sep 18, 2024

What happens to the buffered tasks in case of a shutdown (like sending a signal to kill a pod)? Do they go back into the queue?

It somewhat depends on what your shutdown timeout is (time between TERM and KILL signals -- see the docs). If it is longer than flush_interval + the time to process the tasks then you should be OK and the tasks should get processed.

It also will interact with whether you're acking early or late. It really depends on if you want your tasks to execute at most once or at least once.

@aminalaee
Copy link
Author

Thanks for the reply. So my only concern for using the library is this and I think you have a solution for that. It'd be great if you could document this.

Thanks again for the great work.

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

No branches or pull requests

2 participants