app/models/good_job/execution.rb in good_job-3.6.2 vs app/models/good_job/execution.rb in good_job-3.7.0

- old
+ new

@@ -298,10 +298,10 @@ self.error = [job_error.class, ERROR_MESSAGE_SEPARATOR, job_error.message].join if job_error reenqueued = result.retried? || retried_good_job_id.present? if result.unhandled_error && GoodJob.retry_on_unhandled_error save! - elsif GoodJob.preserve_job_records == true || reenqueued || (result.unhandled_error && GoodJob.preserve_job_records == :on_unhandled_error) + elsif GoodJob.preserve_job_records == true || reenqueued || (result.unhandled_error && GoodJob.preserve_job_records == :on_unhandled_error) || cron_key.present? self.finished_at = Time.current save! else destroy_job end