-
-
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.
provide graceful shutdown interface (#8)
This introduces a mechanism for politely asking Underway to shutdown. To do so, a new function, `graceful_shutdown` is provided. Calling this function will send a notification to a Postgres channel. Workers listen on this channel and when a message is received will stop processing new tasks. If they're already processing a task, then they wait until that task is done or the task timeout has elapsed, whichever is first. In order to cleanly stop the queue, this function should be used. If stopping in-progress tasks is safe for your use case, then this can be ignored and the queue can be stopped without any delay. Closes #5
- Loading branch information
1 parent
47e30c0
commit 03e956b
Showing
5 changed files
with
310 additions
and
14 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
.sqlx/query-45b1b27f9669db53892c4cfad7d09c0e325cfacbf1c37589300fb48e8d9eac49.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
.sqlx/query-54d124a54b2bb28f85b3ee9882f1e103d8e690ea0cb5189411834b9d8b246fc4.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.