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

Should sigterm immediately expire lock? #35

Open
s4ke opened this issue Apr 10, 2021 · 1 comment
Open

Should sigterm immediately expire lock? #35

s4ke opened this issue Apr 10, 2021 · 1 comment

Comments

@s4ke
Copy link
Collaborator

s4ke commented Apr 10, 2021

First off, thanks! This works great.

One thing that I noticed when trying this out is that during redeploy, we have to wait until the lock has timed out until the next single-beat process can pick up the slack. While I applaud the simplicity of this approach, this can be an issue for some deployments that use the locktime of 300 with an interval of 60 as suggested in the README.

Would it be feasible to have the current beat process on detecting a sigterm release the lock in Redis immediately after it is terminated?

@s4ke
Copy link
Collaborator Author

s4ke commented Apr 10, 2021

Also, one other usage question that is related to using this to achieve HA with celery-beat:

Wouldn't it be safer to wait until the child process has actually exited before exiting ourselves? And if the child is not responding, could we do a SIGKILL after a while?

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

1 participant