Method: SolidQueue::Worker#initialize
- Defined in:
- lib/solid_queue/worker.rb
#initialize(**options) ⇒ Worker
Returns a new instance of Worker.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/solid_queue/worker.rb', line 13 def initialize(**) = .dup.with_defaults(SolidQueue::Configuration::WORKER_DEFAULTS) # Ensure that the queues array is deep frozen to prevent accidental modification @queues = Array([:queues]).map(&:freeze).freeze @pool = Pool.new([:threads], on_idle: -> { wake_up }) super(**) end |