Class: Postburner::ActiveJob::Execution
- Inherits:
-
Object
- Object
- Postburner::ActiveJob::Execution
- Defined in:
- lib/postburner/active_job/execution.rb
Overview
Handles execution of ActiveJob jobs from Beanstalkd payloads.
Supports both default jobs (fast, no PostgreSQL) and tracked jobs (full audit trail). Also handles native Postburner::Job format.
Class Method Summary collapse
-
.execute(payload_json, beanstalk_job: nil) ⇒ void
Executes a job from a Beanstalkd payload.
Class Method Details
.execute(payload_json, beanstalk_job: nil) ⇒ void
This method returns an undefined value.
Executes a job from a Beanstalkd payload.
Automatically detects payload type (default, tracked, or native Postburner::Job) and routes to the appropriate execution path.
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/postburner/active_job/execution.rb', line 23 def execute(payload_json, beanstalk_job: nil) payload = Payload.parse(payload_json) if Payload.native_format?(payload) execute_native(payload, beanstalk_job: beanstalk_job) elsif Payload.tracked?(payload) execute_tracked(payload, beanstalk_job: beanstalk_job) else execute_default(payload) end end |