mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
close connections to mongo and ftrack after synchronization
This commit is contained in:
parent
ccc99c50e0
commit
1750d565b4
2 changed files with 21 additions and 0 deletions
|
|
@ -2308,6 +2308,17 @@ class SyncToAvalonLocal(BaseAction):
|
|||
|
||||
return {"success": True, "message": msg}
|
||||
|
||||
finally:
|
||||
try:
|
||||
entities_factory.dbcon.uninstall()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
try:
|
||||
entities_factory.session.close()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
def register(session, plugins_presets={}):
|
||||
'''Register plugin. Called when used as an plugin.'''
|
||||
|
|
|
|||
|
|
@ -2335,6 +2335,16 @@ class SyncToAvalonServer(BaseAction):
|
|||
|
||||
return {"success": True, "message": msg}
|
||||
|
||||
finally:
|
||||
try:
|
||||
entities_factory.dbcon.uninstall()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
try:
|
||||
entities_factory.session.close()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
def register(session, plugins_presets={}):
|
||||
'''Register plugin. Called when used as an plugin.'''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue