Skip to content

Commit

Permalink
chore: define maximum parallel executions
Browse files Browse the repository at this point in the history
  • Loading branch information
marstamm committed Oct 7, 2024
1 parent f653c52 commit 82d5a4a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ def add_task_to_router(router, secrets_manager, task_name, task_function):
print("creating task " + "camunda::RPA-Task::" + task_name)

timeout_seconds = int(os.environ.get("TIMEOUT_SECONDS", 60))
parallel_executions = int(os.environ.get("MAX_PARALLEL_EXECUTIONS", 1))

@router.task(
task_type="camunda::RPA-Task::" + task_name,
exception_handler=my_exception_handler,
timeout_ms=timeout_seconds * 1000,
max_running_jobs=parallel_executions,
max_jobs_to_activate=parallel_executions,
)
async def rpa_task(job: Job):
variables = job.variables.get("camundaRpaTaskInput") or job.variables
Expand Down

0 comments on commit 82d5a4a

Please sign in to comment.