Class: ActiveJob::Logging::LogSubscriber
- Inherits:
-
ActiveSupport::LogSubscriber
- Object
- ActiveSupport::LogSubscriber
- ActiveJob::Logging::LogSubscriber
- Defined in:
- lib/active_job/logging.rb
Instance Method Summary collapse
- #enqueue(event) ⇒ Object
- #enqueue_at(event) ⇒ Object
- #perform(event) ⇒ Object
- #perform_start(event) ⇒ Object
Instance Method Details
#enqueue(event) ⇒ Object
72 73 74 75 76 77 |
# File 'lib/active_job/logging.rb', line 72 def enqueue(event) info do job = event.payload[:job] "Enqueued #{job.class.name} (Job ID: #{job.job_id}) to #{queue_name(event)}" + args_info(job) end end |
#enqueue_at(event) ⇒ Object
79 80 81 82 83 84 |
# File 'lib/active_job/logging.rb', line 79 def enqueue_at(event) info do job = event.payload[:job] "Enqueued #{job.class.name} (Job ID: #{job.job_id}) to #{queue_name(event)} at #{scheduled_at(event)}" + args_info(job) end end |
#perform(event) ⇒ Object
93 94 95 96 97 98 |
# File 'lib/active_job/logging.rb', line 93 def perform(event) info do job = event.payload[:job] "Performed #{job.class.name} from #{queue_name(event)} in #{event.duration.round(2).to_s}ms" end end |
#perform_start(event) ⇒ Object
86 87 88 89 90 91 |
# File 'lib/active_job/logging.rb', line 86 def perform_start(event) info do job = event.payload[:job] "Performing #{job.class.name} from #{queue_name(event)}" + args_info(job) end end |