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

Prevent cli from taking new job after receiving a signal #532

Open
2 of 6 tasks
gaetan-craft opened this issue Feb 17, 2025 · 3 comments
Open
2 of 6 tasks

Prevent cli from taking new job after receiving a signal #532

gaetan-craft opened this issue Feb 17, 2025 · 3 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@gaetan-craft
Copy link
Contributor

Feature description

After receiving a signal (for example SIGUSR), the cli worker stop taking new tasks and exit when the last task he locked is over. The ixit part is nor mandatory

Motivating example

A host running cli worker need to be restarted, for example because of security patches to be applied. I'd like to be able to spawn a new host to take the tasks and sunset the other host letting him finish its running tasks

Supporting development

I :

  • am interested in building this feature myself
  • am interested in collaborating on building this feature
  • am willing to help testing this feature before it's released
  • am willing to write a test-driven test suite for this feature (before it exists)
  • am a Graphile sponsor ❤️
  • have an active support or consultancy contract with Graphile
@benjie
Copy link
Member

benjie commented Feb 17, 2025

This is already the case, I think? It's called "graceful shutdown". It seems we don't have much in the way of documentation around it though!

https://worker.graphile.org/docs/glossary#graceful-shutdown

@gaetan-craft
Copy link
Contributor Author

Oh my bad, sorry, didn't saw this in the documentation.

@benjie
Copy link
Member

benjie commented Feb 17, 2025

Help surfacing it better in the docs would be appreciated!

@benjie benjie reopened this Feb 17, 2025
@benjie benjie added help wanted Extra attention is needed good first issue Good for newcomers labels Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants