SIENTIAPDE-1445

Refactor workflow parameters in tests.ipynb and prepare_worker.py to enhance clarity and flexibility. Updated workflow_id and task_queue to accept dynamic values, and standardized timeout parameters for improved configuration.
This commit is contained in:
vitor-aignosi
2025-12-17 16:46:15 -03:00
parent d7d61f27a4
commit 034e0b2520
2 changed files with 10 additions and 4 deletions

View File

@@ -27,6 +27,8 @@ def prepare_worker(
) -> Worker:
main_workflow_name = main_workflow.__name__.upper()
queue_name = f'{main_workflow_name.lower().replace("_", "-")}-queue'
local_workflow_parameters = {}
for parameter in parameters:
@@ -36,7 +38,7 @@ def prepare_worker(
return Worker(
temporal_client,
task_queue='scouter-queue',
task_queue=queue_name,
workflows=[main_workflow, *other_workflows],
activities=[*activities],
max_concurrent_workflow_tasks=local_workflow_parameters['MAX_CONCURRENT_WORKFLOW_TASKS'],