module CheckerJobs::JobsProcessors::Sidekiq::ClassMethods
Public Instance Methods
options(*args)
click to toggle source
Overrides DSL#options
in order to pass specific options to Sidekiq
. The options could be the queue the job processor must use, or other middleware options of your choice.
Calls superclass method
# File lib/checker_jobs/jobs_processors/sidekiq.rb, line 24 def options(*args) super(*args).tap do sidekiq_options option(:sidekiq, {}) end end
perform_check_in(check, interval)
click to toggle source
# File lib/checker_jobs/jobs_processors/sidekiq.rb, line 30 def perform_check_in(check, interval) # Borrowed from Sidekiq implementation item = { "class" => self, "args" => [check.name.to_s], "at" => Time.now.to_f + interval.to_f, } if (specific_queue = check.options[:queue]) item["queue"] = specific_queue.to_s end client_push(item) end