lib/vx/worker/middlewares/log_job.rb in vx-worker-0.3.0.pre0 vs lib/vx/worker/middlewares/log_job.rb in vx-worker-0.3.0.pre1
- old
+ new
@@ -1,18 +1,14 @@
module Vx
module Worker
LogJob = Struct.new(:app) do
- include Helper::Logger
+ include Helper::Instrument
def call(env)
- logger.tagged("job #{env.job.message.id}.#{env.job.message.job_id}") do
- logger.info "starting job"
- rs = app.call env
- logger.info "done job"
- rs
- end
+ instrument("starting_job", env.job.instrumentation)
+ app.call env
end
end
end
end