Class: Sidekiq::Hierarchy::Observers::WorkflowUpdate
- Inherits:
-
Object
- Object
- Sidekiq::Hierarchy::Observers::WorkflowUpdate
- Defined in:
- lib/sidekiq/hierarchy/observers/workflow_update.rb
Instance Method Summary collapse
Instance Method Details
#call(workflow, status, old_status) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/sidekiq/hierarchy/observers/workflow_update.rb', line 9 def call(workflow, status, old_status) from_set = WorkflowSet.for_status(old_status) to_set = WorkflowSet.for_status(status) to_set.move(workflow, from_set) # Move/add to the new status set end |
#register(callback_registry) ⇒ Object
5 6 7 |
# File 'lib/sidekiq/hierarchy/observers/workflow_update.rb', line 5 def register(callback_registry) callback_registry.subscribe(Notifications::WORKFLOW_UPDATE, self) end |