lib/good_job/adapter.rb in good_job-3.22.0 vs lib/good_job/adapter.rb in good_job-3.23.0

- old
+ new

@@ -47,11 +47,11 @@ # @return [Integer] number of jobs that were successfully enqueued def enqueue_all(active_jobs) active_jobs = Array(active_jobs) return 0 if active_jobs.empty? - Rails.application.reloader.wrap do + Rails.application.executor.wrap do current_time = Time.current executions = active_jobs.map do |active_job| GoodJob::Execution.build_for_enqueue(active_job).tap do |execution| if GoodJob::Execution.discrete_support? execution.make_discrete @@ -137,10 +137,10 @@ # If there is a currently open Bulk in the current thread, direct the # job there to be enqueued using enqueue_all return if GoodJob::Bulk.capture(active_job, queue_adapter: self) - Rails.application.reloader.wrap do + Rails.application.executor.wrap do will_execute_inline = execute_inline? && (scheduled_at.nil? || scheduled_at <= Time.current) execution = GoodJob::Execution.enqueue( active_job, scheduled_at: scheduled_at, create_with_advisory_lock: will_execute_inline