SIENTIAPDE-1231
SIENTIAPDE-1231: Add timeout configuration for Temporal tasks - Introduced new timeout parameters in values.yaml for task execution. - Updated TemporalManager to utilize execution and task timeout settings in seconds. - Enhanced orchestrator_functions.py to include default timeout values for better orchestration control.
This commit is contained in:
@@ -183,6 +183,10 @@ class TemporalManager(BaseActivity):
|
||||
workflow_type = schedule['workflow_type']
|
||||
|
||||
try:
|
||||
execution_timeout_seconds = schedule.get(
|
||||
'execution_timeout_seconds', 300)
|
||||
task_timeout_seconds = schedule.get(
|
||||
'task_timeout_seconds', 300)
|
||||
self.debug(
|
||||
f"Creating schedule {schedule_name}:", metadata=metadata)
|
||||
self.debug(
|
||||
@@ -197,11 +201,11 @@ class TemporalManager(BaseActivity):
|
||||
id=schedule_name,
|
||||
task_queue=f"{workflow_type}-queue",
|
||||
execution_timeout=timedelta(
|
||||
minutes=self.execution_timeout),
|
||||
seconds=execution_timeout_seconds),
|
||||
run_timeout=timedelta(
|
||||
minutes=self.run_timeout),
|
||||
seconds=execution_timeout_seconds),
|
||||
task_timeout=timedelta(
|
||||
minutes=self.task_timeout),
|
||||
seconds=task_timeout_seconds),
|
||||
typed_search_attributes=search_attributes
|
||||
),
|
||||
spec=ScheduleSpec(
|
||||
|
||||
@@ -27,6 +27,9 @@ def common_config(config: dict[str, Any]):
|
||||
"model_id": config['model_id'],
|
||||
"model_name": model['name'],
|
||||
"model_config": model.get('model_config', {}),
|
||||
|
||||
"execution_timeout_seconds": config.get('execution_timeout_seconds', 300),
|
||||
"task_timeout_seconds": config.get('task_timeout_seconds', 300),
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -235,6 +235,12 @@ env:
|
||||
value: "scouter"
|
||||
- name: TEMPORAL_LABORIOUS_NAMESPACE
|
||||
value: "laborious"
|
||||
- name: TEMPORAL_TASK_TIMEOUT_MINUTES
|
||||
value: "10"
|
||||
- name: TEMPORAL_RUN_TIMEOUT_MINUTES
|
||||
value: "20"
|
||||
- name: TEMPORAL_EXECUTION_TIMEOUT_MINUTES
|
||||
value: "20"
|
||||
|
||||
ssh:
|
||||
enabled: true
|
||||
|
||||
Reference in New Issue
Block a user