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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user