Class: Actions::Middleware::RecurringLogic
- Inherits:
-
Dynflow::Middleware
- Object
- Dynflow::Middleware
- Actions::Middleware::RecurringLogic
- Defined in:
- app/lib/actions/middleware/recurring_logic.rb
Instance Method Summary collapse
-
#delay(delay_options, *args) ⇒ Object
::Actions::Middleware::RecurringLogic.
Instance Method Details
#delay(delay_options, *args) ⇒ Object
::Actions::Middleware::RecurringLogic
A middleware designed to make action repeatable. After an action is delayed, it checks whether the delay_options hash contains an id of a recurring logic. If so, it adds the task to the recurring logic’s task group, otherwise does nothing.
10 11 12 13 14 15 16 |
# File 'app/lib/actions/middleware/recurring_logic.rb', line 10 def delay(, *args) pass(, *args).tap do if [:recurring_logic_id] task.add_missing_task_groups(recurring_logic().task_group) end end end |