-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move local repo cleanup into worker shutdown.
Making cleanup Gunicorn's responsibility ensures that the cleanup will be run even if the worker is suddenly shut down. This prevents the worker from having to check for old repos at startup, allowing multiple workers to coexist in the same pod.
- Loading branch information
1 parent
406e41f
commit 2ca4a5e
Showing
3 changed files
with
19 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from activator.activator import cleanup_worker | ||
|
||
|
||
def worker_exit(server, worker): | ||
cleanup_worker() |
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