module Sidekiq::Cron::Launcher

Attributes

cron_poller[R]

Add cron poller to launcher.

Public Class Methods

new(config, **kwargs) click to toggle source

Add cron poller and execute normal initialize of Sidekiq launcher.

Calls superclass method
# File lib/sidekiq/cron/launcher.rb, line 14
def initialize(config, **kwargs)
  config[:cron_poll_interval] = Sidekiq::Cron.configuration.cron_poll_interval.to_i

  @cron_poller = Sidekiq::Cron::Poller.new(config) if config[:cron_poll_interval] > 0
  super
end

Public Instance Methods

quiet() click to toggle source

Execute normal quiet of launcher and quiet cron poller.

Calls superclass method
# File lib/sidekiq/cron/launcher.rb, line 28
def quiet
  cron_poller.terminate if @cron_poller
  super
end
run() click to toggle source

Execute normal run of launcher and run cron poller.

Calls superclass method
# File lib/sidekiq/cron/launcher.rb, line 22
def run
  super
  cron_poller.start if @cron_poller
end
stop() click to toggle source

Execute normal stop of launcher and stop cron poller.

Calls superclass method
# File lib/sidekiq/cron/launcher.rb, line 34
def stop
  cron_poller.terminate if @cron_poller
  super
end