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

Tasks: Graceful stopping and restarting #517

Open
1 task
nphilipp opened this issue Aug 2, 2022 · 0 comments
Open
1 task

Tasks: Graceful stopping and restarting #517

nphilipp opened this issue Aug 2, 2022 · 0 comments

Comments

@nphilipp
Copy link
Collaborator

nphilipp commented Aug 2, 2022

Story

As an operator of Duffy,
I want that running tasks are finished when stopping or restarting the task workers,
so that the work won’t be restarted unnecessarily and all provisioned nodes are known to Duffy.

Acceptance Criteria

  • The task worker systemd unit file is adapted to wait reasonably long so current tasks can finish.

Background

Stopping the task workers while e.g. nodes are provisioned will finish the running Ansible task, so these nodes exist and use up resources, but aren’t known to Duffy and won’t ever get used.

Celery documentation describes how to structure a systemd service accordingly:

https://docs.celeryq.dev/en/latest/userguide/daemonizing.html#usage-systemd

This uses the celery multi command instead of worker, i.e. might need to change how Duffy invokes Celery.

@nphilipp nphilipp self-assigned this Aug 19, 2022
@nphilipp nphilipp removed their assignment Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant