Module: Oujoke::InvoiceQueue::Helper

Included in:
Processor, Publisher
Defined in:
lib/queue/helper.rb

Instance Method Summary collapse

Instance Method Details

#graceful_deathObject



14
15
16
17
# File 'lib/queue/helper.rb', line 14

def graceful_death
  AMQP.stop{ EM.stop }
  exit(0)
end

#log(message) ⇒ Object



5
6
7
# File 'lib/queue/helper.rb', line 5

def log message
  puts "#{MQ.id}: #{message}"
end

#logp(*args) ⇒ Object



9
10
11
12
# File 'lib/queue/helper.rb', line 9

def logp *args
  print args
  $stdout.flush
end