Class: DisqueJockey::WorkerGroup
- Inherits:
-
Object
- Object
- DisqueJockey::WorkerGroup
- Defined in:
- lib/disque_jockey/worker_group.rb
Instance Method Summary collapse
-
#initialize(worker_classes = []) ⇒ WorkerGroup
constructor
A new instance of WorkerGroup.
- #work! ⇒ Object
Constructor Details
#initialize(worker_classes = []) ⇒ WorkerGroup
Returns a new instance of WorkerGroup.
7 8 9 |
# File 'lib/disque_jockey/worker_group.rb', line 7 def initialize(worker_classes = []) @worker_classes = worker_classes # array of classes to instantiate in our group end |
Instance Method Details
#work! ⇒ Object
11 12 13 14 15 16 |
# File 'lib/disque_jockey/worker_group.rb', line 11 def work! register_signal_handlers Supervisor.logger.info("Starting worker group with PID #{Process.pid}...") start_workers work_until_signal end |