Sha256: 7ac1abe418b569f8a0694e13984dc478b66f3f29f4b7afceb76ed3fa0ba96cfd

Contents?: true

Size: 481 Bytes

Versions: 9

Compression:

Stored size: 481 Bytes

Contents

module Sidekiq
  module Hierarchy
    module Observers
      class WorkflowUpdate
        def register(callback_registry)
          callback_registry.subscribe(Notifications::WORKFLOW_UPDATE, self)
        end

        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
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
sidekiq-hierarchy-2.1.0 lib/sidekiq/hierarchy/observers/workflow_update.rb
sidekiq-hierarchy-2.0.1 lib/sidekiq/hierarchy/observers/workflow_update.rb
sidekiq-hierarchy-2.0.0 lib/sidekiq/hierarchy/observers/workflow_update.rb
sidekiq-hierarchy-1.1.0 lib/sidekiq/hierarchy/observers/workflow_update.rb
sidekiq-hierarchy-1.0.0 lib/sidekiq/hierarchy/observers/workflow_update.rb
sidekiq-hierarchy-0.1.4 lib/sidekiq/hierarchy/observers/workflow_update.rb
sidekiq-hierarchy-0.1.3 lib/sidekiq/hierarchy/observers/workflow_update.rb
sidekiq-hierarchy-0.1.2 lib/sidekiq/hierarchy/observers/workflow_update.rb
sidekiq-hierarchy-0.1.1 lib/sidekiq/hierarchy/observers/workflow_update.rb