Class: ActiveJob::QueueAdapters::AsyncAdapter::JobWrapper
- Inherits:
-
Object
- Object
- ActiveJob::QueueAdapters::AsyncAdapter::JobWrapper
- Defined in:
- 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
:nodoc:.
- #perform ⇒ Object
Constructor Details
#initialize(job) ⇒ JobWrapper
:nodoc:
64 65 66 67 |
# File '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 ⇒ Object
69 70 71 |
# File 'lib/active_job/queue_adapters/async_adapter.rb', line 69 def perform Base.execute @job_data end |