mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 13:00:56 +01:00
Show and reap dead daemons from phd.
This commit is contained in:
parent
919421ead7
commit
01b2a6bbe1
1 changed files with 8 additions and 1 deletions
|
@ -50,13 +50,20 @@ final class PhabricatorDaemonControl {
|
|||
"Started",
|
||||
"Daemon");
|
||||
foreach ($daemons as $daemon) {
|
||||
$name = $daemon->getName();
|
||||
if (!$daemon->isRunning()) {
|
||||
$name = '<DEAD> '.$name;
|
||||
if ($daemon->getPIDFile()) {
|
||||
Filesystem::remove($daemon->getPIDFile());
|
||||
}
|
||||
}
|
||||
printf(
|
||||
"%5s\t%-24s\t%s\n",
|
||||
$daemon->getPID(),
|
||||
$daemon->getEpochStarted()
|
||||
? date('M j Y, g:i:s A', $daemon->getEpochStarted())
|
||||
: null,
|
||||
$daemon->getName());
|
||||
$name);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue