Method: Que::Worker#initialize

Defined in:
lib/que/worker.rb

#initialize(queue = '') ⇒ Worker

Returns a new instance of Worker.



15
16
17
18
19
20
21
# File 'lib/que/worker.rb', line 15

def initialize(queue = '')
  super() # For MonitorMixin.
  @queue  = queue
  @state  = :working
  @thread = Thread.new { work_loop }
  @thread.abort_on_exception = true
end