Class: Daemon::Command::StatusCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Daemon::Command::StatusCommand
- Defined in:
- lib/onapp/engine/command/status_command.rb
Overview
Used to show status of onapp-engine service
Instance Attribute Summary
Attributes inherited from BaseCommand
Attributes included from UserInterface
Instance Method Summary (collapse)
-
- (Object) execute
Entry point.
Methods inherited from BaseCommand
Methods included from UserInterface
Constructor Details
This class inherits a constructor from Daemon::Command::BaseCommand
Instance Method Details
- (Object) execute
Entry point
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/onapp/engine/command/status_command.rb', line 10 def execute if engine_pid say "#{Daemon::MasterProcess::PROCESS_NAME} is running (pid #{engine_pid})" else say "#{Daemon::MasterProcess::PROCESS_NAME} is stopped" end if worker_pids.count > 0 say "#{Daemon::PROCESS_NAME} is running (pids #{worker_pids.join(', ')})" return true else say "#{Daemon::PROCESS_NAME} is stopped" return false end end |