Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / notification / setup / PhabricatorAphlictSetupCheck.php
blob7a00673ae10e55091da46dd5c126bc7c9f1b8fa3
1 <?php
3 final class PhabricatorAphlictSetupCheck extends PhabricatorSetupCheck {
5 protected function executeChecks() {
6 try {
7 PhabricatorNotificationClient::tryAnyConnection();
8 } catch (Exception $ex) {
9 $message = pht(
10 "Phabricator is configured to use a notification server, but is ".
11 "unable to connect to it. You should resolve this issue or disable ".
12 "the notification server. It may be helpful to double check your ".
13 "configuration or restart the server using the command below.\n\n%s",
14 phutil_tag(
15 'pre',
16 array(),
17 array(
18 get_class($ex),
19 "\n",
20 $ex->getMessage(),
21 )));
24 $this->newIssue('aphlict.connect')
25 ->setShortName(pht('Notification Server Down'))
26 ->setName(pht('Unable to Connect to Notification Server'))
27 ->setSummary(
28 pht(
29 'Phabricator is configured to use a notification server, '.
30 'but is not able to connect to it.'))
31 ->setMessage($message)
32 ->addRelatedPhabricatorConfig('notification.servers')
33 ->addCommand(
34 pht(
35 "(To start the server, run this command.)\n%s",
36 'phabricator/ $ ./bin/aphlict start'));
38 return;