Module: Sidekiq::Cron::Launcher
- Defined in:
- lib/sidekiq/cron/launcher.rb
Instance Attribute Summary collapse
-
#cron_poller ⇒ Object
readonly
Add cron poller to launcher.
Instance Method Summary collapse
-
#initialize(config, **kwargs) ⇒ Object
Add cron poller and execute normal initialize of Sidekiq launcher.
-
#quiet ⇒ Object
Execute normal quiet of launcher and quiet cron poller.
-
#run ⇒ Object
Execute normal run of launcher and run cron poller.
-
#stop ⇒ Object
Execute normal stop of launcher and stop cron poller.
Instance Attribute Details
#cron_poller ⇒ Object (readonly)
Add cron poller to launcher.
11 12 13 |
# File 'lib/sidekiq/cron/launcher.rb', line 11 def cron_poller @cron_poller end |
Instance Method Details
#initialize(config, **kwargs) ⇒ Object
Add cron poller and execute normal initialize of Sidekiq launcher.
14 15 16 17 18 19 20 |
# File 'lib/sidekiq/cron/launcher.rb', line 14 def initialize(config, **kwargs) config[:cron_poll_interval] = Sidekiq::Cron.configuration.cron_poll_interval.to_i config[:cron_poll_process_count] = Sidekiq::Cron.configuration.cron_poll_process_count @cron_poller = Sidekiq::Cron::Poller.new(config) if config[:cron_poll_interval] > 0 super end |
#quiet ⇒ Object
Execute normal quiet of launcher and quiet cron poller.
29 30 31 32 |
# File 'lib/sidekiq/cron/launcher.rb', line 29 def quiet cron_poller.terminate if @cron_poller super end |
#run ⇒ Object
Execute normal run of launcher and run cron poller.
23 24 25 26 |
# File 'lib/sidekiq/cron/launcher.rb', line 23 def run super cron_poller.start if @cron_poller end |
#stop ⇒ Object
Execute normal stop of launcher and stop cron poller.
35 36 37 38 |
# File 'lib/sidekiq/cron/launcher.rb', line 35 def stop cron_poller.terminate if @cron_poller super end |