From a4fb7d406bf6ef8e7b5201d95a98ec2ed27e7a1a Mon Sep 17 00:00:00 2001 From: vitor-aignosi Date: Mon, 14 Jul 2025 16:52:45 -0300 Subject: [PATCH] SIENTIAPDE-1150 refactor: enhance schedule configuration in formatters to include updated_at timestamps for scouter and predictions_batch pipelines, improving state management --- orchestrator/activities/formatters.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/orchestrator/activities/formatters.py b/orchestrator/activities/formatters.py index 834826f..1c021cc 100644 --- a/orchestrator/activities/formatters.py +++ b/orchestrator/activities/formatters.py @@ -53,11 +53,18 @@ class Formatters(BaseActivity): for pipeline in pipelines: if pipeline['workflow_type'] == 'scouter': - schedule_config[self.scouter_namespace][pipeline['schedule_name']] = scouter( - pipeline) + schedule_config[self.scouter_namespace][pipeline['schedule_name']] = { + **scouter(pipeline), + "updated_at": pipeline.get( + "updated_at", datetime.now().strftime(DEFAULT_DATE_FORMAT)) + } elif pipeline['workflow_type'] == 'predictions_batch': schedule_config[self.laborious_namespace][pipeline['schedule_name'] - ] = predictions_batch(pipeline) + ] = { + **predictions_batch(pipeline), + "updated_at": pipeline.get( + "updated_at", datetime.now().strftime(DEFAULT_DATE_FORMAT)) + } self.logger.info("Processed schedules")