diff --git a/app/models/good_job/execution.rb b/app/models/good_job/execution.rb index 30b87336a..eb4bc59b3 100644 --- a/app/models/good_job/execution.rb +++ b/app/models/good_job/execution.rb @@ -248,7 +248,7 @@ def self.next_scheduled_at(after: nil, limit: 100, now_limit: nil) # Whether to establish a lock on the {Execution} record after it is created. # @return [Execution] # The new {Execution} instance representing the queued ActiveJob job. - def self.enqueue(active_job, scheduled_at: nil, create_with_advisory_lock: false, persist_immediately: true) + def self.enqueue(active_job, scheduled_at: nil, create_with_advisory_lock: false) ActiveSupport::Notifications.instrument("enqueue_job.good_job", { active_job: active_job, scheduled_at: scheduled_at, create_with_advisory_lock: create_with_advisory_lock }) do |instrument_payload| execution_args = { active_job_id: active_job.job_id, diff --git a/lib/good_job/adapter.rb b/lib/good_job/adapter.rb index a05c73c9d..d2a3703d5 100644 --- a/lib/good_job/adapter.rb +++ b/lib/good_job/adapter.rb @@ -97,8 +97,7 @@ def enqueue_at(active_job, timestamp) execution = GoodJob::Execution.enqueue( active_job, scheduled_at: scheduled_at, - create_with_advisory_lock: will_execute_inline, - persist_immediately: true + create_with_advisory_lock: will_execute_inline ) if will_execute_inline