Class: TyrantManager::Commands::Stop
- Inherits:
-
TyrantManager::Command
- Object
- TyrantManager::Command
- TyrantManager::Commands::Stop
- Defined in:
- lib/tyrant_manager/commands/stop.rb
Overview
Stop one or more tyrant instances
Instance Attribute Summary
Attributes inherited from TyrantManager::Command
Instance Method Summary collapse
Methods inherited from TyrantManager::Command
#after, #before, #command_name, command_name, #error, find, inherited, #initialize, list, #logger
Constructor Details
This class inherits a constructor from TyrantManager::Command
Instance Method Details
#run ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/tyrant_manager/commands/stop.rb', line 13 def run manager.each_instance( ['instances'] ) do |instance| if File.exist?( instance.pid_file ) then logger.info "Stopping #{instance.name} : pid #{instance.pid}" instance.stop else logger.info "Stopping #{instance.name} : no pid file, nothing to do" end end end |