Module: Sidekiq::Cron::Launcher
- Defined in:
- lib/sidekiq/cron/launcher.rb
Constant Summary collapse
- DEFAULT_POLL_INTERVAL =
30
Instance Attribute Summary collapse
-
#cron_poller ⇒ Object
readonly
Add cron poller to launcher.
Instance Method Summary collapse
-
#initialize(options) ⇒ 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.
14 15 16 |
# File 'lib/sidekiq/cron/launcher.rb', line 14 def cron_poller @cron_poller end |
Instance Method Details
#initialize(options) ⇒ Object
Add cron poller and execute normal initialize of Sidekiq launcher.
17 18 19 20 21 22 |
# File 'lib/sidekiq/cron/launcher.rb', line 17 def initialize() [:cron_poll_interval] = DEFAULT_POLL_INTERVAL if [:cron_poll_interval].nil? @cron_poller = Sidekiq::Cron::Poller.new() if [:cron_poll_interval] > 0 super() end |
#quiet ⇒ Object
Execute normal quiet of launcher and quiet cron poller.
31 32 33 34 |
# File 'lib/sidekiq/cron/launcher.rb', line 31 def quiet cron_poller.terminate if @cron_poller super end |
#run ⇒ Object
Execute normal run of launcher and run cron poller.
25 26 27 28 |
# File 'lib/sidekiq/cron/launcher.rb', line 25 def run super cron_poller.start if @cron_poller end |
#stop ⇒ Object
Execute normal stop of launcher and stop cron poller.
37 38 39 40 |
# File 'lib/sidekiq/cron/launcher.rb', line 37 def stop cron_poller.terminate if @cron_poller super end |