lib/daemonizer/worker_pool.rb in daemonizer-0.1.5 vs lib/daemonizer/worker_pool.rb in daemonizer-0.1.6
- old
+ new
@@ -1,14 +1,13 @@
module Daemonizer
class WorkerPool
attr_reader :name, :logger
- def initialize(name, pm, engine, &blk)
+ def initialize(name, pm, &blk)
@name = name
@pm = pm
@worker_block = blk
- @engine = engine
@workers = []
@logger = @pm.logger
end
def shutdown?
@@ -16,10 +15,10 @@
end
def start_workers(number)
logger.debug "Creating #{number} workers for #{name} pool..."
number.times do |i|
- @workers << Worker.new(name, @pm, @engine, i+1, &@worker_block)
+ @workers << Worker.new(name, @pm, i+1, &@worker_block)
end
end
def check_workers
logger.debug "Checking loop #{name} workers..."