Class: HerokuDroid

Inherits:
Droid
  • Object
show all
Defined in:
lib/droid/heroku.rb

Constant Summary

Constants inherited from Droid

Droid::DEFAULT_TTL

Instance Method Summary collapse

Methods inherited from Droid

bunny, call, closing?, default_config, gen_queue, handle_error, #initialize, log, #log, log=, name, name=, pop, #publish, publish, publish_to_ex, publish_to_q, reconnect_on_error, reset_bunny, start, stop_safe, version, wait_for_tcp_port

Methods included from Droid::EMTimerUtils

included, #periodic_timer, #timer

Methods included from Droid::BackwardsCompatibleMethods

#listen4

Methods included from Droid::QueueMethods

#listener, #worker

Constructor Details

This class inherits a constructor from Droid

Instance Method Details

#call_statsObject



34
35
36
# File 'lib/droid/heroku.rb', line 34

def call_stats
  @stats ? @stats.call : nil
end

#nameObject



38
39
40
# File 'lib/droid/heroku.rb', line 38

def name
  Droid.name
end

#stats(&blk) ⇒ Object



27
28
29
30
31
32
# File 'lib/droid/heroku.rb', line 27

def stats(&blk)
  @stats = blk
  out = call_stats
  out = out.inspect unless out.kind_of?(String)
  Log.notice out
end