fix logging order

This commit is contained in:
2026-06-16 09:01:52 +02:00
parent 731d3419c4
commit 15ec372121

View File

@@ -56,6 +56,13 @@ def pipeline_KPI_calculation(
return_code = 1
export_status_code = internal_pipe_state.code
if export_status_code == 0:
logger_pipeline.info("Pipeline >%s< ended successfully", PIPELINE_NAME)
else:
logger_pipeline.info(
"Pipeline >%s< ended with error. Code: %d", PIPELINE_NAME, export_status_code
)
logger_database.info("Prepare collected metadata...")
dur_sek = (t2 - t1) / 1e9
dur = dopt_dt.timedelta_from_val(dur_sek, dopt_dt.TimeUnitsTimedelta.SECONDS)
@@ -82,12 +89,6 @@ def pipeline_KPI_calculation(
return return_code
logger_database.info("Successfully saved metadata to database")
if export_status_code == 0:
logger_pipeline.info("Pipeline >%s< ended successfully", PIPELINE_NAME)
else:
logger_pipeline.info(
"Pipeline >%s< ended with error. Code: %d", PIPELINE_NAME, export_status_code
)
logger_pipeline.info(
"Pipeline >%s<: execution duration was %.4f seconds",
PIPELINE_NAME,