"Failed enqueuing #{job.class.name} to #{queue_name(event)}: #{ex.class} (#{ex.message}):\n"+Array(ex.backtrace).join("\n")
end
elsifevent.payload[:aborted]
infodo
"Failed enqueuing #{job.class.name} to #{queue_name(event)}, a before_enqueue callback halted the enqueuing execution."
end
else
infodo
"Enqueued #{job.class.name} (Job ID: #{job.job_id}) to #{queue_name(event)}"+args_info(job)
"Enqueued #{job.class.name} (Job ID: #{job.job_id}) to #{queue_name(event)}"+args_info(job)
end
end
end
end
end
defenqueue_at(event)
defenqueue_at(event)
infodo
job=event.payload[:job]
job=event.payload[:job]
ex=event.payload[:exception_object]
ifex
errordo
"Failed enqueuing #{job.class.name} to #{queue_name(event)}: #{ex.class} (#{ex.message}):\n"+Array(ex.backtrace).join("\n")
end
elsifevent.payload[:aborted]
infodo
"Failed enqueuing #{job.class.name} to #{queue_name(event)}, a before_enqueue callback halted the enqueuing execution."
end
else
infodo
"Enqueued #{job.class.name} (Job ID: #{job.job_id}) to #{queue_name(event)} at #{scheduled_at(event)}"+args_info(job)
"Enqueued #{job.class.name} (Job ID: #{job.job_id}) to #{queue_name(event)} at #{scheduled_at(event)}"+args_info(job)
end
end
end
end
end
defperform_start(event)
defperform_start(event)
infodo
infodo
...
@@ -32,6 +56,10 @@ def perform(event)
...
@@ -32,6 +56,10 @@ def perform(event)
errordo
errordo
"Error performing #{job.class.name} (Job ID: #{job.job_id}) from #{queue_name(event)} in #{event.duration.round(2)}ms: #{ex.class} (#{ex.message}):\n"+Array(ex.backtrace).join("\n")
"Error performing #{job.class.name} (Job ID: #{job.job_id}) from #{queue_name(event)} in #{event.duration.round(2)}ms: #{ex.class} (#{ex.message}):\n"+Array(ex.backtrace).join("\n")
end
end
elsifevent.payload[:aborted]
errordo
"Error performing #{job.class.name} (Job ID: #{job.job_id}) from #{queue_name(event)} in #{event.duration.round(2)}ms: a before_perform callback halted the job execution"
end
else
else
infodo
infodo
"Performed #{job.class.name} (Job ID: #{job.job_id}) from #{queue_name(event)} in #{event.duration.round(2)}ms"
"Performed #{job.class.name} (Job ID: #{job.job_id}) from #{queue_name(event)} in #{event.duration.round(2)}ms"