Skip to content

Conversation

@Daniii44
Copy link

Before this change, the program would only exit once all spawned tasks had completed. With the new behavior, the program also quits if either Ctrl-C or SIGTERM is received. The advantage is that operations such as docker compose restart now complete almost immediately. Previously, a graceful shutdown request sent by Docker via SIGTERM had no effect, causing a 10-second wait before Docker forcefully killed the previous instance.

This solution is not perfect, since all spawned tasks are effectively terminated when the main function returns. However, it is not a step back from the previous behavior — termination now simply happens sooner.

I tested both shutdown methods and have deployed this change locally. On that note, thanks for creating this project!

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

Successfully merging this pull request may close these issues.

1 participant