Sha256: affb60e589aa5821a343f74c9d5397310bdbee1578f7ae4c809eb37070334ac1
Contents?: true
Size: 676 Bytes
Versions: 1
Compression:
Stored size: 676 Bytes
Contents
module DirtyPipeline class Worker include Sidekiq::Worker sidekiq_options queue: "default", retry: 1, dead: true # args should contain - "enqueued_pipelines" - Array of Pipeline children # args should contain - some args to find_subject # args should contain - some args to make transition def perform(options) # FIXME: get rid of ActiveSupport #constantize pipeline_klass = options.fetch("enqueued_pipeline").constantize subject = pipeline_klass.find_subject(*options.fetch("find_subject_args")) pipeline_klass.new(subject).call(*options.fetch("transition_args")) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dirty_pipeline-0.4.0 | lib/dirty_pipeline/worker.rb |