Method: Sumac::Scheduler#initialize
- Defined in:
- lib/sumac/scheduler.rb
#initialize(connection, worker_count) ⇒ Scheduler
Returns a new instance of Scheduler.
4 5 6 7 8 9 |
# File 'lib/sumac/scheduler.rb', line 4 def initialize(connection, worker_count) raise "argument 'connection' must be a Connection" unless connection.is_a?(Connection) @connection = connection @worker_pool = WorkerPool.new(worker_count) @dispatch_worker = nil end |