diff options
author | Mohit Natoo <mohitnatoo@gmail.com> | 2018-08-09 20:33:43 +0530 |
---|---|---|
committer | Mohit Natoo <mohitnatoo@gmail.com> | 2018-08-09 20:33:43 +0530 |
commit | 39d87a4b7b34c86c16b2fd9e31d6ec21a5150103 (patch) | |
tree | 6804fd2ec0c5557855858578782cc76b148e0f15 | |
parent | 3000c1490565b3a21376d6444cb6fe24dfe4e383 (diff) | |
download | rails-39d87a4b7b34c86c16b2fd9e31d6ec21a5150103.tar.gz rails-39d87a4b7b34c86c16b2fd9e31d6ec21a5150103.tar.bz2 rails-39d87a4b7b34c86c16b2fd9e31d6ec21a5150103.zip |
perform_or_enqueue instead of enqueue_or_perform
-rw-r--r-- | activejob/lib/active_job/queue_adapters/test_adapter.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activejob/lib/active_job/queue_adapters/test_adapter.rb b/activejob/lib/active_job/queue_adapters/test_adapter.rb index 885f9ff01c..3aa25425eb 100644 --- a/activejob/lib/active_job/queue_adapters/test_adapter.rb +++ b/activejob/lib/active_job/queue_adapters/test_adapter.rb @@ -29,14 +29,14 @@ module ActiveJob return if filtered?(job) job_data = job_to_hash(job) - enqueue_or_perform(perform_enqueued_jobs, job, job_data) + perform_or_enqueue(perform_enqueued_jobs, job, job_data) end def enqueue_at(job, timestamp) #:nodoc: return if filtered?(job) job_data = job_to_hash(job, at: timestamp) - enqueue_or_perform(perform_enqueued_at_jobs, job, job_data) + perform_or_enqueue(perform_enqueued_at_jobs, job, job_data) end private @@ -44,7 +44,7 @@ module ActiveJob { job: job.class, args: job.serialize.fetch("arguments"), queue: job.queue_name }.merge!(extras) end - def enqueue_or_perform(perform, job, job_data) + def perform_or_enqueue(perform, job, job_data) if perform performed_jobs << job_data Base.execute job.serialize |