Class: RabbitWQ::Server

Inherits:
Object
  • Object
show all
Includes:
Logging, Queues, ServerLogging
Defined in:
lib/rabbit_wq/server.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Server

Returns a new instance of Server.



15
16
17
18
19
# File 'lib/rabbit_wq/server.rb', line 15

def initialize( options )
  @options = options

  configure_server
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



11
12
13
# File 'lib/rabbit_wq/server.rb', line 11

def options
  @options
end

#work_consumerObject (readonly)

Returns the value of attribute work_consumer.



11
12
13
# File 'lib/rabbit_wq/server.rb', line 11

def work_consumer
  @work_consumer
end

Instance Method Details

#startObject



21
22
23
24
25
26
27
# File 'lib/rabbit_wq/server.rb', line 21

def start
  log_startup
  run

  trap( INT ) { finalize; exit }
  sleep
end