Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/check/PhabricatorDaemonsSetupCheck.php
Show All 20 Lines | try { | ||||
// Just skip this warning if the query fails for some reason. | // Just skip this warning if the query fails for some reason. | ||||
$no_daemons = false; | $no_daemons = false; | ||||
} | } | ||||
if ($no_daemons) { | if ($no_daemons) { | ||||
$doc_href = PhabricatorEnv::getDoclink('Managing Daemons with phd'); | $doc_href = PhabricatorEnv::getDoclink('Managing Daemons with phd'); | ||||
$summary = pht( | $summary = pht( | ||||
'You must start the Phabricator daemons to send email, rebuild '. | 'You must start the daemons to send email, rebuild search indexes, '. | ||||
'search indexes, and do other background processing.'); | 'and do other background processing.'); | ||||
$message = pht( | $message = pht( | ||||
'The Phabricator daemons are not running, so Phabricator will not '. | 'The daemons are not running, background processing (including '. | ||||
'be able to perform background processing (including sending email, '. | 'sending email, rebuilding search indexes, importing commits, '. | ||||
'rebuilding search indexes, importing commits, cleaning up old data, '. | 'cleaning up old data, and running builds) can not be performed.'. | ||||
'and running builds).'. | |||||
"\n\n". | "\n\n". | ||||
'Use %s to start daemons. See %s for more information.', | 'Use %s to start daemons. See %s for more information.', | ||||
phutil_tag('tt', array(), 'bin/phd start'), | phutil_tag('tt', array(), 'bin/phd start'), | ||||
phutil_tag( | phutil_tag( | ||||
'a', | 'a', | ||||
array( | array( | ||||
'href' => $doc_href, | 'href' => $doc_href, | ||||
'target' => '_blank', | 'target' => '_blank', | ||||
), | ), | ||||
pht('Managing Daemons with phd'))); | pht('Managing Daemons with phd'))); | ||||
$this->newIssue('daemons.not-running') | $this->newIssue('daemons.not-running') | ||||
->setShortName(pht('Daemons Not Running')) | ->setShortName(pht('Daemons Not Running')) | ||||
->setName(pht('Phabricator Daemons Are Not Running')) | ->setName(pht('Daemons Are Not Running')) | ||||
->setSummary($summary) | ->setSummary($summary) | ||||
->setMessage($message) | ->setMessage($message) | ||||
->addCommand('phabricator/ $ ./bin/phd start'); | ->addCommand('$ ./bin/phd start'); | ||||
} | } | ||||
$expect_user = PhabricatorEnv::getEnvConfig('phd.user'); | $expect_user = PhabricatorEnv::getEnvConfig('phd.user'); | ||||
if (strlen($expect_user)) { | if (strlen($expect_user)) { | ||||
try { | try { | ||||
$all_daemons = id(new PhabricatorDaemonLogQuery()) | $all_daemons = id(new PhabricatorDaemonLogQuery()) | ||||
->setViewer(PhabricatorUser::getOmnipotentUser()) | ->setViewer(PhabricatorUser::getOmnipotentUser()) | ||||
Show All 24 Lines | if (strlen($expect_user)) { | ||||
phutil_tag('tt', array(), $expect_user), | phutil_tag('tt', array(), $expect_user), | ||||
phutil_tag('tt', array(), 'phd.user')); | phutil_tag('tt', array(), 'phd.user')); | ||||
$this->newIssue('daemons.run-as-different-user') | $this->newIssue('daemons.run-as-different-user') | ||||
->setName(pht('Daemon Running as Wrong User')) | ->setName(pht('Daemon Running as Wrong User')) | ||||
->setSummary($summary) | ->setSummary($summary) | ||||
->setMessage($message) | ->setMessage($message) | ||||
->addPhabricatorConfig('phd.user') | ->addPhabricatorConfig('phd.user') | ||||
->addCommand('phabricator/ $ ./bin/phd restart'); | ->addCommand('$ ./bin/phd restart'); | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } |