Skip to content

Commit 096f6d2

Browse files
Fix product status check during startup
During startup, if no schema upgrade is needed, it is unnecessary to query the status of all products one more time. As part of this change, also added a log message when connecting to products.
1 parent e1ddfe6 commit 096f6d2

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

web/server/codechecker_server/cli/server.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ def check_product_db_status(cfg_sql_server, migration_root, environ):
466466
467467
:returns: dictionary of product endpoints with database statuses
468468
"""
469+
LOG.info("Connecting to product databases ...")
469470
engine = cfg_sql_server.create_engine()
470471
config_session = sessionmaker(bind=engine)
471472
sess = config_session()
@@ -1023,9 +1024,9 @@ def server_init_start(args):
10231024
None,
10241025
force_upgrade)
10251026

1026-
prod_statuses = check_product_db_status(cfg_sql_server,
1027-
context.run_migration_root,
1028-
environ)
1027+
prod_statuses = check_product_db_status(cfg_sql_server,
1028+
context.run_migration_root,
1029+
environ)
10291030
print_prod_status(prod_statuses)
10301031

10311032
non_ok_db = False

0 commit comments

Comments
 (0)