@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Warn if daemons are not running

Summary:
Currently, we try to mostly-kind-of-work if daemons aren't running (for example, we send mail in-process). I want to stop doing this. A major motivator is that `metamta.send-immediately` is confusing for a lot of users and frequently the cause of performance problems. Increasingly, functionality of applications depends on the daemons (Harbormaster, Drydock, Nuance all require daemons to do anything at all). They're also fairly stable/robust/well-tested and no reasonable install should be running without them.

This will let us simplify or remove some flags (like `metamta.send-immediately`) and simplify some other processes like search indexing.

Test Plan: Stopped daemons, loaded warnings, saw daemon warning. Started daemons, reloade, no warning.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3857

Differential Revision: https://secure.phabricator.com/D7964

+48
+2
src/__phutil_library_map__.php
··· 1924 1924 'PhabricatorSetupCheckAuth' => 'applications/config/check/PhabricatorSetupCheckAuth.php', 1925 1925 'PhabricatorSetupCheckBaseURI' => 'applications/config/check/PhabricatorSetupCheckBaseURI.php', 1926 1926 'PhabricatorSetupCheckBinaries' => 'applications/config/check/PhabricatorSetupCheckBinaries.php', 1927 + 'PhabricatorSetupCheckDaemons' => 'applications/config/check/PhabricatorSetupCheckDaemons.php', 1927 1928 'PhabricatorSetupCheckDatabase' => 'applications/config/check/PhabricatorSetupCheckDatabase.php', 1928 1929 'PhabricatorSetupCheckExtensions' => 'applications/config/check/PhabricatorSetupCheckExtensions.php', 1929 1930 'PhabricatorSetupCheckExtraConfig' => 'applications/config/check/PhabricatorSetupCheckExtraConfig.php', ··· 4564 4565 'PhabricatorSetupCheckAuth' => 'PhabricatorSetupCheck', 4565 4566 'PhabricatorSetupCheckBaseURI' => 'PhabricatorSetupCheck', 4566 4567 'PhabricatorSetupCheckBinaries' => 'PhabricatorSetupCheck', 4568 + 'PhabricatorSetupCheckDaemons' => 'PhabricatorSetupCheck', 4567 4569 'PhabricatorSetupCheckDatabase' => 'PhabricatorSetupCheck', 4568 4570 'PhabricatorSetupCheckExtensions' => 'PhabricatorSetupCheck', 4569 4571 'PhabricatorSetupCheckExtraConfig' => 'PhabricatorSetupCheck',
+46
src/applications/config/check/PhabricatorSetupCheckDaemons.php
··· 1 + <?php 2 + 3 + final class PhabricatorSetupCheckDaemons extends PhabricatorSetupCheck { 4 + 5 + protected function executeChecks() { 6 + 7 + $task_daemon = id(new PhabricatorDaemonLogQuery()) 8 + ->setViewer(PhabricatorUser::getOmnipotentUser()) 9 + ->withStatus(PhabricatorDaemonLogQuery::STATUS_ALIVE) 10 + ->withDaemonClasses(array('PhabricatorTaskmasterDaemon')) 11 + ->setLimit(1) 12 + ->execute(); 13 + 14 + if (!$task_daemon) { 15 + $doc_href = PhabricatorEnv::getDocLink( 16 + 'article/Managing_Daemons_with_phd.html'); 17 + 18 + $summary = pht( 19 + 'You must start the Phabricator daemons to send email, rebuild '. 20 + 'search indexes, and do other background processing.'); 21 + 22 + $message = pht( 23 + 'The Phabricator daemons are not running, so Phabricator will not '. 24 + 'be able to perform background processing (including sending email, '. 25 + 'rebuilding search indexes, importing commits, cleaning up old data, '. 26 + 'running builds, etc.).'. 27 + "\n\n". 28 + 'Use %s to start daemons. See %s for more information.', 29 + phutil_tag('tt', array(), 'bin/phd start'), 30 + phutil_tag( 31 + 'a', 32 + array( 33 + 'href' => $doc_href, 34 + ), 35 + pht('Managing Daemons with phd'))); 36 + 37 + $this->newIssue('daemons.not-running') 38 + ->setShortName(pht('Daemons Not Running')) 39 + ->setName(pht('Phabricator Daemons Are Not Running')) 40 + ->setSummary($summary) 41 + ->setMessage($message) 42 + ->addCommand('phabricator/ $ ./bin/phd start'); 43 + } 44 + 45 + } 46 + }