Class: Clockwork::DatabaseEvents::Manager
- Defined in:
- lib/clockwork/database_events/manager.rb
Instance Attribute Summary
Attributes inherited from Manager
Instance Method Summary collapse
Methods inherited from Manager
#configure, #default_configuration, #error_handler, #every, #fire_callbacks, #graceful_shutdown, #handle_error, #handle_signal, #handler, #initialize, #log, #log_error, #logger, #on, #run, #run_tick_loop, #shutdown, #stop_tick_loop, #thread_available?, #tick, #wait_tick_loop_finishes
Constructor Details
This class inherits a constructor from Clockwork::Manager
Instance Method Details
#register(period, job, block, options) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/clockwork/database_events/manager.rb', line 11 def register(period, job, block, ) @events << if [:from_database] synchronizer = .fetch(:synchronizer) model_attributes = .fetch(:model_attributes) Clockwork::DatabaseEvents::Event. new(self, period, job, (block || handler), synchronizer, model_attributes, ) else Clockwork::Event.new(self, period, job, block || handler, ) end end |
#unregister(event) ⇒ Object
7 8 9 |
# File 'lib/clockwork/database_events/manager.rb', line 7 def unregister(event) @events.delete(event) end |