mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
added session validation to get_mongo_connection
This commit is contained in:
parent
f4e58771a2
commit
0dec31288b
1 changed files with 2 additions and 0 deletions
|
|
@ -156,6 +156,8 @@ class OpenPypeMongoConnection:
|
||||||
# Naive validation of existing connection
|
# Naive validation of existing connection
|
||||||
try:
|
try:
|
||||||
connection.server_info()
|
connection.server_info()
|
||||||
|
with connection.start_session():
|
||||||
|
pass
|
||||||
except Exception:
|
except Exception:
|
||||||
connection = None
|
connection = None
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue