Class: TyrantManager::Commands::ProcessStatus
- Inherits:
-
TyrantManager::Command
- Object
- TyrantManager::Command
- TyrantManager::Commands::ProcessStatus
- Defined in:
- lib/tyrant_manager/commands/status.rb
Overview
Report the status of one ore more tyrant intances
Instance Attribute Summary
Attributes inherited from TyrantManager::Command
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from TyrantManager::Command
#after, #before, #command_name, #error, find, inherited, #initialize, list, #logger
Constructor Details
This class inherits a constructor from TyrantManager::Command
Class Method Details
.command_name ⇒ Object
8 9 10 |
# File 'lib/tyrant_manager/commands/status.rb', line 8 def self.command_name 'process-status' end |
Instance Method Details
#run ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/tyrant_manager/commands/status.rb', line 12 def run manager.each_instance do |instance| ilist = ['instances'] if ilist == %w[ all ] or ilist.include?( instance.name ) then if instance.running? then logger.info "#{instance.name} is running as pid #{instance.pid}" else logger.info "#{instance.name} is not running, or its pid file is gone" end end end end |