Class: SidekiqScheduler::Manager
- Inherits:
-
Object
- Object
- SidekiqScheduler::Manager
- Defined in:
- lib/sidekiq-scheduler/manager.rb
Overview
The delayed job router in the system. This manages the scheduled jobs pushed messages from Redis onto the work queues
Instance Method Summary collapse
-
#initialize(config) ⇒ Manager
constructor
A new instance of Manager.
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(config) ⇒ Manager
Returns a new instance of Manager.
11 12 13 14 15 16 17 |
# File 'lib/sidekiq-scheduler/manager.rb', line 11 def initialize(config) (config) @scheduler_instance = SidekiqScheduler::Scheduler.new(config) SidekiqScheduler::Scheduler.instance = @scheduler_instance Sidekiq.schedule = config.schedule if @scheduler_instance.enabled end |
Instance Method Details
#start ⇒ Object
23 24 25 |
# File 'lib/sidekiq-scheduler/manager.rb', line 23 def start @scheduler_instance.load_schedule! end |
#stop ⇒ Object
19 20 21 |
# File 'lib/sidekiq-scheduler/manager.rb', line 19 def stop @scheduler_instance.clear_schedule! end |