class Libis::Ingester::RunWorker
Public Class Methods
push_restart_job(run_id, queue)
click to toggle source
# File lib/libis/ingester/workers/run_worker.rb, line 23 def self.push_restart_job(run_id, queue) client_push('class' => self, 'queue' => queue, 'retry' => false, 'args' => [run_id, action: :restart]) end
push_retry_job(run_id, queue)
click to toggle source
# File lib/libis/ingester/workers/run_worker.rb, line 19 def self.push_retry_job(run_id, queue) client_push('class' => self, 'queue' => queue, 'retry' => false, 'args' => [run_id, action: :retry]) end
subject(run_id)
click to toggle source
# File lib/libis/ingester/workers/run_worker.rb, line 27 def self.subject(run_id) ::Libis::Ingester::Run.find_by(id: run_id) end
Public Instance Methods
perform(run_id, options = {})
click to toggle source
# File lib/libis/ingester/workers/run_worker.rb, line 13 def perform(run_id, options = {}) run = ::Libis::Ingester::Run.find_by(id: run_id) raise RuntimeError.new "Run #{run_id} not found" unless run.is_a? ::Libis::Ingester::Run run.execute options.key_symbols_to_strings(recursive: true) end