mirror of
https://github.com/Novartis/cellxgene-gateway.git
synced 2026-10-11 00:50:57 +08:00
made pruner a daemon thread
This commit is contained in:
@@ -378,8 +378,10 @@ def ip_address():
|
||||
|
||||
def start_pruner_thread():
|
||||
pruner = PruneProcessCache(cache)
|
||||
|
||||
background_thread = Thread(target=pruner)
|
||||
# Run the pruner as a daemon thread so it won't block interpreter
|
||||
# shutdown (for example when Ctrl-C is used in the main thread).
|
||||
# This avoids "Exception ignored in: <module 'threading'...>" at exit.
|
||||
background_thread = Thread(target=pruner, daemon=True)
|
||||
background_thread.start()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user