Skip to content

Commit 5ebe7db

Browse files
committed
remove secho
1 parent fb44dbe commit 5ebe7db

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

invenio_app_rdm/utils/utils.py

-17
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
import os
1212

13-
from click import secho
14-
1513

1614
def build_db_uri():
1715
"""Build the database URI."""
@@ -23,18 +21,12 @@ def build_db_uri():
2321

2422
if all(params.values()):
2523
uri = f"postgresql+psycopg2://{params['user']}:{params['password']}@{params['host']}:{params['port']}/{params['name']}"
26-
secho(
27-
f"Constructed database URI: '{params['user']}:***@{params['host']}:{params['port']}/{params['name']}'",
28-
fg="blue",
29-
)
3024
return uri
3125

3226
uri = os.environ.get("SQLALCHEMY_DATABASE_URI")
3327
if uri:
34-
secho(f"Using SQLALCHEMY_DATABASE_URI: '{uri}'", fg="blue")
3528
return uri
3629

37-
secho(f"Falling back to the default URI: '{DEFAULT_URI}'", fg="blue")
3830
return DEFAULT_URI
3931

4032

@@ -48,18 +40,12 @@ def build_broker_url():
4840

4941
if all(params.values()):
5042
uri = f"amqp://{params['user']}:{params['password']}@{params['host']}:{params['port']}/"
51-
secho(
52-
f"Constructed AMQP URL: '{params['user']}:***@{params['host']}:{params['port']}/'",
53-
fg="blue",
54-
)
5543
return uri
5644

5745
uri = os.environ.get("BROKER_URL")
5846
if uri:
59-
secho(f"AMQP URI: '{uri}'", fg="blue")
6047
return uri
6148

62-
secho(f"Falling back to the default URI: '{DEFAULT_BROKER_URL}'", fg="blue")
6349
return DEFAULT_BROKER_URL
6450

6551

@@ -74,13 +60,10 @@ def build_redis_url(db=None):
7460
if redis_host and redis_port:
7561
password = f":{redis_password}@" if redis_password else ""
7662
uri = f"redis://{password}{redis_host}:{redis_port}/{db}"
77-
secho(f"Constructed Redis URL: '{uri}'", fg="blue")
7863
return uri
7964

8065
uri = os.environ.get("BROKER_URL")
8166
if uri and uri.startswith(("redis://", "rediss://", "unix://")):
82-
secho(f"Using Redis BROKER_URL: '{uri}'", fg="blue")
8367
return uri
8468

85-
secho(f"Falling back to the default Redis URL: '{DEFAULT_BROKER_URL}'", fg="blue")
8669
return DEFAULT_BROKER_URL

0 commit comments

Comments
 (0)