Class: Sidekiq::Cron::Poller

Inherits:
Scheduled::Poller
  • Object
show all
Defined in:
lib/sidekiq/cron/poller.rb

Overview

The Poller checks Redis every N seconds for sheduled cron jobs

Instance Method Summary collapse

Instance Method Details

#enqueueObject



10
11
12
13
14
15
16
17
18
19
# File 'lib/sidekiq/cron/poller.rb', line 10

def enqueue
  Sidekiq::Cron::Job.all.each do |job|
    enqueue_job(job)
  end
rescue => ex
  # Most likely a problem with redis networking.
  # Punt and try again at the next interval
  logger.error ex.message
  logger.error ex.backtrace.first
end