mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
close validation mongo connection
This commit is contained in:
parent
e8c52214dc
commit
75f9fd7d1c
1 changed files with 1 additions and 0 deletions
|
|
@ -131,6 +131,7 @@ def validate_mongo_connection(cnx: str) -> (bool, str):
|
|||
try:
|
||||
client = MongoClient(**mongo_args)
|
||||
client.server_info()
|
||||
client.close()
|
||||
except ServerSelectionTimeoutError as e:
|
||||
return False, f"Cannot connect to server {cnx} - {e}"
|
||||
except ValueError:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue