mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #33568 from mohitnatoo/perform-or-enqueue
perform_or_enqueue instead of enqueue_or_perform
This commit is contained in:
commit
924f443716
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue