Configure what you want to happen when there is more than one run at a time.
concurrencyLimit
property on the task’s queue. This limits the number of runs that can be executing at any one time:
task1
and task2
share the same queue, so only one of them can run at a time.
concurrencyKey
. It creates a copy of the queue for each unique value of the key.
Your backend code:
WAITING
state and releases its concurrency slot back to both the queue and the environment, allowing other runs to execute or resume.
This means that:
WAITING
state (checkpointed at waitpoints) do not consume concurrency slotsWAITING
state than your queue’s concurrency limitconcurrencyLimit
of 1:
WAITING
state that belong to that queuetriggerAndWait
call, it checkpoints and transitions to the WAITING
state, releasing its concurrency slot back to both its queue and the environment. Once the subtask completes, the parent task will resume and re-acquire a concurrency slot.