use 'add_certificate_path_to_mongo_url' on openpype start

This commit is contained in:
iLLiCiTiT 2021-10-01 14:55:57 +02:00
parent 76dd29daa7
commit be191b0c93
2 changed files with 5 additions and 1 deletions

View file

@ -79,6 +79,9 @@ def validate_mongo_connection(cnx: str) -> (bool, str):
kwargs = {
"serverSelectionTimeoutMS": 2000
}
# Add certificate path if should be required
cnx = add_certificate_path_to_mongo_url(cnx)
try:
client = MongoClient(cnx, **kwargs)
client.server_info()

View file

@ -193,6 +193,7 @@ import igniter # noqa: E402
from igniter import BootstrapRepos # noqa: E402
from igniter.tools import (
get_openpype_path_from_db,
add_certificate_path_to_mongo_url,
validate_mongo_connection
) # noqa
from igniter.bootstrap_repos import OpenPypeVersion # noqa: E402
@ -585,7 +586,7 @@ def _determine_mongodb() -> str:
except ValueError:
raise RuntimeError("Missing MongoDB url")
return openpype_mongo
return add_certificate_path_to_mongo_url(openpype_mongo)
def _initialize_environment(openpype_version: OpenPypeVersion) -> None: