mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
crash all server if mongo error happened
This commit is contained in:
parent
5d6f91d614
commit
11f0c41e90
1 changed files with 9 additions and 1 deletions
|
|
@ -225,6 +225,10 @@ def main_loop(ftrack_url, username, api_key, event_paths):
|
|||
|
||||
# If thread failed test Ftrack and Mongo connection
|
||||
elif not storer_thread.isAlive():
|
||||
if storer_thread.mongo_error:
|
||||
raise Exception(
|
||||
"Exiting because have issue with acces to MongoDB"
|
||||
)
|
||||
storer_thread.join()
|
||||
storer_thread = None
|
||||
ftrack_accessible = False
|
||||
|
|
@ -237,7 +241,11 @@ def main_loop(ftrack_url, username, api_key, event_paths):
|
|||
processor_thread.start()
|
||||
|
||||
# If thread failed test Ftrack and Mongo connection
|
||||
elif processor_thread.isAlive():
|
||||
elif not processor_thread.isAlive():
|
||||
if storer_thread.mongo_error:
|
||||
raise Exception(
|
||||
"Exiting because have issue with acces to MongoDB"
|
||||
)
|
||||
processor_thread.join()
|
||||
processor_thread = None
|
||||
ftrack_accessible = False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue