Sha256: b487ecb7f09731bcca81df90c004cfea20e3c63ec30bbd7458c83f100a94f54c
Contents?: true
Size: 463 Bytes
Versions: 1
Compression:
Stored size: 463 Bytes
Contents
module AsyncRequest class JobProcessor include Sidekiq::Worker sidekiq_options queue: AsyncRequest.config[:queue], retry: AsyncRequest.config[:retry] def perform(id) job = Job.find(id) job.processing! status, response = job.worker.constantize.new.execute(*job.params) job.update_attributes!( status: Job.statuses[:processed], status_code: status, response: response.to_json ) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
async_request-0.0.7 | app/workers/async_request/job_processor.rb |