diff --git a/app/models/good_job/discrete_execution.rb b/app/models/good_job/discrete_execution.rb index 7f2e0097..56654bd2 100644 --- a/app/models/good_job/discrete_execution.rb +++ b/app/models/good_job/discrete_execution.rb @@ -46,7 +46,8 @@ def queue_latency # Monotonic time between when this job started and finished def runtime_latency - if self.class.monotonic_duration_migrated? + # migrated and Rails greater than 6.1 + if self.class.monotonic_duration_migrated? && Gem::Version.new(Rails.version) >= Gem::Version.new('6.1.0.a') duration elsif performed_at (finished_at || Time.current) - performed_at