Skip to content

Commit 8bcf92d

Browse files
committed
more logs on init-db
1 parent 130a75c commit 8bcf92d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cads_broker/entry_points.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,11 +297,12 @@ def init_db(connection_string: Optional[str] = None, force: bool = False) -> Non
297297
connection_string: something like 'postgresql://user:password@netloc:port/dbname'
298298
force: if True, drop the database structure and build again from scratch
299299
"""
300+
database.logger.info("starting creation/updating of broker db structure and storage cache area.")
300301
if not connection_string:
301302
dbsettings = config.ensure_settings(config.dbsettings)
302303
connection_string = dbsettings.connection_string
303304
database.init_database(connection_string, force=force)
304-
print("successfully created/updated the broker database structure.")
305+
database.logger.info("successfully created/updated the broker database structure.")
305306

306307
# get storage parameters from environment
307308
for key in ("OBJECT_STORAGE_URL", "STORAGE_ADMIN", "STORAGE_PASSWORD"):
@@ -322,7 +323,8 @@ def init_db(connection_string: Optional[str] = None, force: bool = False) -> Non
322323
object_storage.create_download_bucket(
323324
download_bucket, object_storage_url, **storage_kws
324325
)
325-
print("successfully created the cache areas in the object storage.")
326+
database.logger.info("successfully created the cache areas in the object storage.")
327+
database.logger.info("end of creation/updating of broker db structure and storage cache area.")
326328

327329

328330
@app.command()

0 commit comments

Comments
 (0)