MCPcopy Create free account
hub / github.com/StackStorm/st2 / eval_action_execution_delay

Function eval_action_execution_delay

st2common/st2common/services/workflows.py:685–702  ·  view source on GitHub ↗
(task_ex_req, ac_ex_req, itemized=False)

Source from the content-addressed store, hash-verified

683
684
685def eval_action_execution_delay(task_ex_req, ac_ex_req, itemized=False):
686 task_ex_delay = task_ex_req.get("delay")
687 items_concurrency = task_ex_req.get("concurrency")
688
689 # If there is a task delay and not with items, return the delay value.
690 if task_ex_delay and not itemized:
691 return task_ex_delay
692
693 # If there is a task delay and task has items but no concurrency, return the delay value.
694 if task_ex_delay and itemized and not items_concurrency:
695 return task_ex_delay
696
697 # If there is a task delay and task has items with concurrency,
698 # return the delay value up if item id is less than the concurrency value.
699 if task_ex_delay and itemized and ac_ex_req["item_id"] < items_concurrency:
700 return task_ex_delay
701
702 return None
703
704
705@retrying.retry(

Callers 1

request_task_executionFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected