Class: MultiBackgroundJob::Middleware::UniqueJob::Faktory::Worker

Inherits:
Object
  • Object
show all
Defined in:
lib/multi_background_job/middleware/unique_job/faktory.rb

Overview

Worker middleware runs around the execution of a job

Instance Method Summary collapse

Instance Method Details

#call(_jobinst, payload) ⇒ Object



22
23
24
25
26
27
# File 'lib/multi_background_job/middleware/unique_job/faktory.rb', line 22

def call(_jobinst, payload)
  if payload.is_a?(Hash) && (unique_lock = unique_job_lock(payload))
    unique_lock.unlock
  end
  yield
end