SIENTIAPDE-1150
refactor: enhance schedule configuration in formatters to include updated_at timestamps for scouter and predictions_batch pipelines, improving state management
This commit is contained in:
@@ -53,11 +53,18 @@ class Formatters(BaseActivity):
|
|||||||
|
|
||||||
for pipeline in pipelines:
|
for pipeline in pipelines:
|
||||||
if pipeline['workflow_type'] == 'scouter':
|
if pipeline['workflow_type'] == 'scouter':
|
||||||
schedule_config[self.scouter_namespace][pipeline['schedule_name']] = scouter(
|
schedule_config[self.scouter_namespace][pipeline['schedule_name']] = {
|
||||||
pipeline)
|
**scouter(pipeline),
|
||||||
|
"updated_at": pipeline.get(
|
||||||
|
"updated_at", datetime.now().strftime(DEFAULT_DATE_FORMAT))
|
||||||
|
}
|
||||||
elif pipeline['workflow_type'] == 'predictions_batch':
|
elif pipeline['workflow_type'] == 'predictions_batch':
|
||||||
schedule_config[self.laborious_namespace][pipeline['schedule_name']
|
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")
|
self.logger.info("Processed schedules")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user