Class: Daemons::Application
- Inherits:
-
Object
- Object
- Daemons::Application
- Defined in:
- lib/kryten/summoner.rb
Instance Method Summary collapse
Instance Method Details
#customstatus(app) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/kryten/summoner.rb', line 7 def customstatus(app) app_name = app.[:app_name] pid = app.pid.pid.to_s running = app.running? ? 'running' : 'not running' running_and_pid = if app.running? and app.pid.exist? " [pid #{pid}]" end running_no_pid = if app.pid.exist? and not app.running? " (but pid-file exists: #{pid}')" end "#{app_name}: #{running}#{running_and_pid}#{running_no_pid}" end |