Class: Smith::Commands::Status
- Inherits:
-
Smith::CommandBase
- Object
- Smith::CommandBase
- Smith::Commands::Status
- Defined in:
- lib/smith/commands/smithctl/status.rb
Instance Attribute Summary
Attributes inherited from Smith::CommandBase
Instance Method Summary collapse
Methods inherited from Smith::CommandBase
#banner, #format_help, #initialize, #parse_options
Methods included from Logger
Constructor Details
This class inherits a constructor from Smith::CommandBase
Instance Method Details
#execute ⇒ Object
8 9 10 11 12 |
# File 'lib/smith/commands/smithctl/status.rb', line 8 def execute status do |s| responder.succeed((s) ? "Agency running" : "Agency not running") end end |
#status(&blk) ⇒ Object
14 15 16 17 18 |
# File 'lib/smith/commands/smithctl/status.rb', line 14 def status(&blk) Messaging::Queue.number_of_consumers(QueueDefinitions::Agency_control) do |consumers_count| blk.call(consumers_count > 0) end end |