close connections to mongo and ftrack after synchronization

This commit is contained in:
iLLiCiTiT 2019-11-15 17:44:46 +01:00
parent ccc99c50e0
commit 1750d565b4
2 changed files with 21 additions and 0 deletions

View file

@ -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.'''

View file

@ -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.'''