resque-job-stats
resque-job-stats copied to clipboard
Jobs run twice to measure duration for duration and history modules
In modules Resque::Plugins::JobStats::Duration
and Resque::Plugins::JobStats::History
I see two different callbacks that start from around_perform_
? From what I understand it means that job run twice to measure the time, is it intentional behaviour?
I'm trying to make this gem work with ActiveJob and this is how I can make around_perform_
callbacks work
base.around_perform do |job, block|
job.class.methods.select do |meth|
meth.to_s.start_with?("around_perform_")
end.each do |meth|
job.class.send(meth) { block.call }
end
end
but in this case if we have more than 1 callback we call job few times. Could we discuss it?