SIENTIAPDE-1646

SIENTIAPDE-1646: Remove validate.sh script, refactor TemporalManager for improved readability, and update temporal schedule tests to explicitly define workflow types and align task queue naming conventions.
This commit is contained in:
vitor-aignosi
2026-07-21 10:17:30 -03:00
parent 7b845a7de4
commit a4b6f6aa88
3 changed files with 38 additions and 139 deletions

View File

@@ -27,6 +27,7 @@ with workflow.unsafe.imports_passed_through():
RUNTIME_WORKFLOWS = ['predictions_batch', 'minimal_retrain', 'drift', 'simple_metrics']
class TemporalManager(SientiaMonitoring):
"""
Temporal workflow and schedule management activity.
@@ -215,8 +216,12 @@ class TemporalManager(SientiaMonitoring):
self.debug(
f'{json.dumps(schedule, indent=4, sort_keys=True)}', metadata=metadata
)
runtime_name = schedule.get('runtime', 'legacy') if workflow_type in RUNTIME_WORKFLOWS else None
runtime_name = (
schedule.get('runtime', 'legacy')
if workflow_type in RUNTIME_WORKFLOWS
else None
)
task_queue_name = build_queue_name(workflow_type, runtime_name)
schedule['task_queue'] = task_queue_name
@@ -322,7 +327,11 @@ class TemporalManager(SientiaMonitoring):
raise ValueError(f'Schedule {schedule_name} not found')
workflow_type = schedule['workflow_type']
runtime_name = schedule.get('runtime', 'legacy') if workflow_type in RUNTIME_WORKFLOWS else None
runtime_name = (
schedule.get('runtime', 'legacy')
if workflow_type in RUNTIME_WORKFLOWS
else None
)
schedule['task_queue'] = build_queue_name(workflow_type, runtime_name)
# fmt: off