Class: ActiveJob::QueueAdapters::AsyncAdapter::JobWrapper
- 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.
Instance Method Summary collapse
-
#initialize(job) ⇒ JobWrapper
constructor
A new instance of JobWrapper.
- #perform ⇒ Object
Constructor Details
#initialize(job) ⇒ JobWrapper
Returns a new instance of JobWrapper.
64 65 66 67 |
# 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 |