lib/notable/job_extensions.rb in notable-0.3.2 vs lib/notable/job_extensions.rb in notable-0.3.3
- old
+ new
@@ -2,11 +2,11 @@
module JobExtensions
extend ActiveSupport::Concern
included do
around_perform do |job, block|
- # no way to get queued_at time :(
- Notable.track_job(job.class.name, job.job_id, job.queue_name, nil, try(:notable_slow_job_threshold)) do
+ # enqueued_at is only available in Active Job 6+
+ Notable.track_job(job.class.name, job.job_id, job.queue_name, job.try(:enqueued_at), try(:notable_slow_job_threshold)) do
block.call
end
end
end
end