lib/sidekiq/scheduler.rb
# Set to enable or disable the scheduler.
Set to enable or disable the scheduler.
Set to enable or disable the scheduler .
def update_schedule
        if Sidekiq.redis { |r| r.scard(:schedules_changed) } > 0
          logger.info 'Updating schedule'
          Sidekiq.reload_schedule!
          while schedule_name = Sidekiq.redis { |r| r.spop(:schedules_changed) }
            if Sidekiq.schedule.keys.include?(schedule_name)
              unschedule_job(schedule_name)
              load_schedule_job(schedule_name, Sidekiq.schedule[schedule_name])
            else
              unschedule_job(schedule_name)
            end
          end
          logger.info 'Schedule updated'
        end
      end
def update_schedule if Sidekiq . redis { | r | r . scard ( :schedules_changed ) } > 0 logger . info 'Updating schedule' Sidekiq . reload_schedule! while schedule_name = Sidekiq . redis { | r | r . spop ( :schedules_changed ) } if Sidekiq . schedule . keys . include? ( schedule_name ) unschedule_job ( schedule_name ) load_schedule_job ( schedule_name , Sidekiq . schedule [ schedule_name ] ) else unschedule_job ( schedule_name ) end end logger . info 'Schedule updated' end end
Set to enable or disable the scheduler.
Set to enable or disable the scheduler .