lib/good_job/adapter.rb in good_job-3.15.0 vs lib/good_job/adapter.rb in good_job-3.15.1

- old
+ new

@@ -62,9 +62,10 @@ results = GoodJob::Execution.insert_all(executions.map(&:attributes), returning: %w[id active_job_id]) # rubocop:disable Rails/SkipsModelValidations job_id_to_provider_job_id = results.each_with_object({}) { |result, hash| hash[result['active_job_id']] = result['id'] } active_jobs.each do |active_job| active_job.provider_job_id = job_id_to_provider_job_id[active_job.job_id] + active_job.successfully_enqueued = active_job.provider_job_id.present? if active_job.respond_to?(:successfully_enqueued=) end executions.each do |execution| execution.instance_variable_set(:@new_record, false) if job_id_to_provider_job_id[execution.active_job_id] end executions = executions.select(&:persisted?) # prune unpersisted executions