diff --git a/app/jobs/concerns/spotlight/job_tracking.rb b/app/jobs/concerns/spotlight/job_tracking.rb index d7da0aa2e..73f2c454a 100644 --- a/app/jobs/concerns/spotlight/job_tracking.rb +++ b/app/jobs/concerns/spotlight/job_tracking.rb @@ -44,7 +44,7 @@ def initialize_job_tracker!(**params) end def finalize_job_tracker! - return unless job_tracker.status == 'in_progress' || job_tracker.status == 'enqueued' + return unless %w[in_progress enqueued].include?(job_tracker.status) job_tracker.update( status: @failed ? 'failed' : 'completed',