-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add signal handler for SIGTERM & SIGINT to terminate services (#54)
* Add `terminate` method to service * Create signal handler for SIGTERM & SIGINT * Add tests for service task cancellation * Implement service task cancellation handling * Use simple sync signal handler that cancels all asyncio tasks * Add tests for signal handler * Move asyncio sleep to end of loop * Remove `_only_once` test specific parameter by introducing a `RuntimeError` in tests instead
- Loading branch information
Showing
4 changed files
with
189 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters