mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-28 17:52:43 +01:00
47 lines
1.5 KiB
PHP
47 lines
1.5 KiB
PHP
|
<?php
|
||
|
|
||
|
final class PhabricatorSetupCheckDaemons extends PhabricatorSetupCheck {
|
||
|
|
||
|
protected function executeChecks() {
|
||
|
|
||
|
$task_daemon = id(new PhabricatorDaemonLogQuery())
|
||
|
->setViewer(PhabricatorUser::getOmnipotentUser())
|
||
|
->withStatus(PhabricatorDaemonLogQuery::STATUS_ALIVE)
|
||
|
->withDaemonClasses(array('PhabricatorTaskmasterDaemon'))
|
||
|
->setLimit(1)
|
||
|
->execute();
|
||
|
|
||
|
if (!$task_daemon) {
|
||
|
$doc_href = PhabricatorEnv::getDocLink(
|
||
|
'article/Managing_Daemons_with_phd.html');
|
||
|
|
||
|
$summary = pht(
|
||
|
'You must start the Phabricator daemons to send email, rebuild '.
|
||
|
'search indexes, and do other background processing.');
|
||
|
|
||
|
$message = pht(
|
||
|
'The Phabricator daemons are not running, so Phabricator will not '.
|
||
|
'be able to perform background processing (including sending email, '.
|
||
|
'rebuilding search indexes, importing commits, cleaning up old data, '.
|
||
|
'running builds, etc.).'.
|
||
|
"\n\n".
|
||
|
'Use %s to start daemons. See %s for more information.',
|
||
|
phutil_tag('tt', array(), 'bin/phd start'),
|
||
|
phutil_tag(
|
||
|
'a',
|
||
|
array(
|
||
|
'href' => $doc_href,
|
||
|
),
|
||
|
pht('Managing Daemons with phd')));
|
||
|
|
||
|
$this->newIssue('daemons.not-running')
|
||
|
->setShortName(pht('Daemons Not Running'))
|
||
|
->setName(pht('Phabricator Daemons Are Not Running'))
|
||
|
->setSummary($summary)
|
||
|
->setMessage($message)
|
||
|
->addCommand('phabricator/ $ ./bin/phd start');
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|