(task_ex_req, ac_ex_req, itemized=False)
| 683 | |
| 684 | |
| 685 | def 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( |
no test coverage detected