Class: Vx::Worker::LogJob
- Inherits:
-
Struct
- Object
- Struct
- Vx::Worker::LogJob
- Includes:
- Helper::Logger
- Defined in:
- lib/vx/worker/middlewares/log_job.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
Instance Method Summary collapse
Methods included from Helper::Logger
Instance Attribute Details
#app ⇒ Object
Returns the value of attribute app
4 5 6 |
# File 'lib/vx/worker/middlewares/log_job.rb', line 4 def app @app end |
Instance Method Details
#call(env) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/vx/worker/middlewares/log_job.rb', line 8 def call(env) logger.tagged("job #{env.job..id}.#{env.job..job_id}") do logger.info "starting job" rs = app.call env logger.info "done job" rs end end |