SIENTIAPDE-1441
Refactor prepare_worker function to return a single Worker instance instead of a list, streamlining worker configuration and improving code clarity.
This commit is contained in:
@@ -25,7 +25,7 @@ def prepare_worker(
|
||||
other_workflows: Sequence[Type],
|
||||
activities: Sequence[Any],
|
||||
temporal_client: Client,
|
||||
):
|
||||
) -> Worker:
|
||||
|
||||
main_workflow_name = main_workflow.__name__.upper()
|
||||
|
||||
@@ -36,8 +36,7 @@ def prepare_worker(
|
||||
os.getenv(main_workflow_name + '_' + parameter[0], parameter[1]))
|
||||
|
||||
|
||||
return [
|
||||
Worker(
|
||||
return Worker(
|
||||
temporal_client,
|
||||
task_queue='scouter-queue',
|
||||
workflows=[main_workflow, *other_workflows],
|
||||
@@ -57,4 +56,3 @@ def prepare_worker(
|
||||
maximum=local_workflow_parameters['ACTIVITY_POLLER_BEHAVIUR_MAXIMUM'],
|
||||
),
|
||||
)
|
||||
]
|
||||
Reference in New Issue
Block a user