123456789_123456789_123456789_123456789_123456789_

Class: ActiveJob::QueueAdapters::AsyncAdapter::JobWrapper

Do not use. This class is for internal use only.
Relationships & Source Files
Inherits: Object
Defined in: activejob/lib/active_job/queue_adapters/async_adapter.rb

Overview

Note that we don’t actually need to serialize the jobs since we’re performing them in-process, but we do so anyway for parity with other adapters and deployment environments. Otherwise, serialization bugs may creep in undetected.

Class Method Summary

Instance Method Summary

Constructor Details

.new(job) ⇒ JobWrapper

[ GitHub ]

  
# File 'activejob/lib/active_job/queue_adapters/async_adapter.rb', line 64

def initialize(job)
  job.provider_job_id = SecureRandom.uuid
  @job_data = job.serialize
end

Instance Method Details

#perform

[ GitHub ]

  
# File 'activejob/lib/active_job/queue_adapters/async_adapter.rb', line 69

def perform
  Base.execute @job_data
end