Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/daemon/control/PhabricatorDaemonReference.php
Show All 34 Lines | if ($daemon_ids) { | ||||
// Ignore any issues here; getting this information only allows us | // Ignore any issues here; getting this information only allows us | ||||
// to provide a more complete picture of daemon status, and we want | // to provide a more complete picture of daemon status, and we want | ||||
// these commands to work if the database is inaccessible. | // these commands to work if the database is inaccessible. | ||||
} | } | ||||
$logs = mpull($logs, null, 'getDaemonID'); | $logs = mpull($logs, null, 'getDaemonID'); | ||||
} | } | ||||
// Support PID files that use the old daemon format, where each overseer | |||||
// had exactly one daemon. We can eventually remove this; they will still | |||||
// be stopped by `phd stop --force` even if we don't identify them here. | |||||
if (!$daemons && idx($dict, 'name')) { | |||||
$daemons = array( | |||||
array( | |||||
'config' => array( | |||||
'class' => idx($dict, 'name'), | |||||
'argv' => idx($dict, 'argv', array()), | |||||
), | |||||
), | |||||
); | |||||
} | |||||
foreach ($daemons as $daemon) { | foreach ($daemons as $daemon) { | ||||
$ref = new PhabricatorDaemonReference(); | $ref = new PhabricatorDaemonReference(); | ||||
// NOTE: This is the overseer PID, not the actual daemon process PID. | // NOTE: This is the overseer PID, not the actual daemon process PID. | ||||
// This is correct for checking status and sending signals (the only | // This is correct for checking status and sending signals (the only | ||||
// things we do with it), but might be confusing. $daemon['pid'] has | // things we do with it), but might be confusing. $daemon['pid'] has | ||||
// the daemon PID, and we could expose that if we had some use for it. | // the daemon PID, and we could expose that if we had some use for it. | ||||
▲ Show 20 Lines • Show All 98 Lines • Show Last 20 Lines |