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:
parent
919421ead7
commit
01b2a6bbe1
1 changed files with 8 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue