Class: Woodhouse::Middleware::LogDispatch

Inherits:
Woodhouse::Middleware show all
Defined in:
lib/woodhouse/middleware/log_dispatch.rb

Instance Method Summary collapse

Methods inherited from Woodhouse::Middleware

#initialize

Constructor Details

This class inherits a constructor from Woodhouse::Middleware

Instance Method Details

#call(job) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/woodhouse/middleware/log_dispatch.rb', line 3

def call(job)
  begin
    yield job
  rescue => err
    log "#{job.describe} could not be dispatched: #{err.inspect}"
    raise err
  end
  log "#{job.describe} dispatched"
end