mirror of
https://github.com/clearml/clearml-server
synced 2025-04-10 07:45:27 +00:00
Add better mongodb connection string verbosity
This commit is contained in:
parent
5de7c12062
commit
78989fea91
@ -54,7 +54,7 @@ class DatabaseFactory:
|
||||
override_port = first(map(getenv, OVERRIDE_PORT_ENV_KEY), None)
|
||||
|
||||
if override_connection_string:
|
||||
log.info(f"Using override mongodb connection string {override_connection_string}")
|
||||
log.info(f"Using override mongodb connection string template {override_connection_string}")
|
||||
else:
|
||||
if override_hostname:
|
||||
log.info(f"Using override mongodb host {override_hostname}")
|
||||
@ -69,7 +69,9 @@ class DatabaseFactory:
|
||||
entry = cls._create_db_entry(alias=alias, settings=db_entries.get(key))
|
||||
|
||||
if override_connection_string:
|
||||
entry.host = override_connection_string
|
||||
con_str = f"{override_connection_string.rstrip('/')}/{key}"
|
||||
log.info(f"Using override mongodb connection string for {alias}: {con_str}")
|
||||
entry.host = con_str
|
||||
else:
|
||||
if override_hostname:
|
||||
entry.host = furl(entry.host).set(host=override_hostname).url
|
||||
|
Loading…
Reference in New Issue
Block a user