1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-18 21:02:41 +01:00

Show and reap dead daemons from phd.

This commit is contained in:
epriestley 2011-03-27 00:23:39 -07:00
parent 919421ead7
commit 01b2a6bbe1

View file

@ -50,13 +50,20 @@ final class PhabricatorDaemonControl {
"Started", "Started",
"Daemon"); "Daemon");
foreach ($daemons as $daemon) { foreach ($daemons as $daemon) {
$name = $daemon->getName();
if (!$daemon->isRunning()) {
$name = '<DEAD> '.$name;
if ($daemon->getPIDFile()) {
Filesystem::remove($daemon->getPIDFile());
}
}
printf( printf(
"%5s\t%-24s\t%s\n", "%5s\t%-24s\t%s\n",
$daemon->getPID(), $daemon->getPID(),
$daemon->getEpochStarted() $daemon->getEpochStarted()
? date('M j Y, g:i:s A', $daemon->getEpochStarted()) ? date('M j Y, g:i:s A', $daemon->getEpochStarted())
: null, : null,
$daemon->getName()); $name);
} }
return 0; return 0;