Module: Sidekiq::Cron::Launcher

Defined in:
lib/sidekiq/cron/launcher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cron_pollerObject (readonly)

Add cron poller to launcher


13
14
15
# File 'lib/sidekiq/cron/launcher.rb', line 13

def cron_poller
  @cron_poller
end

Instance Method Details

#initialize(options) ⇒ Object

add cron poller and execute normal initialize of Sidekiq launcher


16
17
18
19
# File 'lib/sidekiq/cron/launcher.rb', line 16

def initialize(options)
  @cron_poller = Sidekiq::Cron::Poller.new
  super(options)
end

#quietObject

execute normal quiet of launcher and quiet cron poller


28
29
30
31
# File 'lib/sidekiq/cron/launcher.rb', line 28

def quiet
  cron_poller.terminate
  super
end

#runObject

execute normal run of launcher and run cron poller


22
23
24
25
# File 'lib/sidekiq/cron/launcher.rb', line 22

def run
  super
  cron_poller.start
end

#stopObject

execute normal stop of launcher and stop cron poller


34
35
36
37
# File 'lib/sidekiq/cron/launcher.rb', line 34

def stop
  cron_poller.terminate
  super
end