mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
atexit register has args now
This commit is contained in:
parent
e7c9a61b2e
commit
24175a2587
1 changed files with 4 additions and 2 deletions
|
|
@ -166,7 +166,7 @@ def main_loop(ftrack_url, username, api_key, event_paths):
|
|||
printed_mongo_error = False
|
||||
|
||||
# stop threads on exit
|
||||
def on_exit():
|
||||
def on_exit(processor_thread, storer_thread):
|
||||
if processor_thread is not None:
|
||||
processor_thread.stop()
|
||||
processor_thread.join()
|
||||
|
|
@ -177,7 +177,9 @@ def main_loop(ftrack_url, username, api_key, event_paths):
|
|||
storer_thread.join()
|
||||
storer_thread = None
|
||||
|
||||
atexit.register(on_exit)
|
||||
atexit.register(
|
||||
on_exit, processor_thread=processor_thread, storer_thread=storer_thread
|
||||
)
|
||||
# Main loop
|
||||
while True:
|
||||
# Check if accessible Ftrack and Mongo url
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue