Added possibility for timeout as in other places

This commit is contained in:
Petr Kalis 2021-11-25 15:05:34 +01:00
parent df6a3faef6
commit 22f8c13c7f

View file

@ -59,7 +59,7 @@ def validate_mongo_connection(cnx: str) -> (bool, str):
return False, "Not mongodb schema"
kwargs = {
"serverSelectionTimeoutMS": 2000
"serverSelectionTimeoutMS": os.environ.get("AVALON_TIMEOUT", 2000)
}
# Add certificate path if should be required
if should_add_certificate_path_to_mongo_url(cnx):