method
step
v8.1.1 -
Show latest stable
- Class:
ActiveJob::LogSubscriber
step(event)public
No documentation available.
# File activejob/lib/active_job/log_subscriber.rb, line 178
def step(event)
job = event.payload[:job]
step = event.payload[:step]
ex = event.payload[:exception_object]
if event.payload[:interrupted]
info do
"Step '#{step.name}' interrupted at cursor '#{step.cursor}' for #{job.class} (Job ID: #{job.job_id}) in #{event.duration.round(2)}ms"
end
elsif ex
error do
"Error during step '#{step.name}' at cursor '#{step.cursor}' for #{job.class} (Job ID: #{job.job_id}) in #{event.duration.round(2)}ms: #{ex.class} (#{ex.message})"
end
else
info do
"Step '#{step.name}' completed for #{job.class} (Job ID: #{job.job_id}) in #{event.duration.round(2)}ms"
end
end
end