mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 12:00:55 +01:00
Minor tidying of some Aphlict code
Summary: Self-explanatory. Test Plan: Eyeball it. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D11424
This commit is contained in:
parent
2b12f61602
commit
94730a1a43
2 changed files with 5 additions and 6 deletions
|
@ -6,15 +6,14 @@ final class PhabricatorNotificationClient {
|
||||||
|
|
||||||
public static function getServerStatus() {
|
public static function getServerStatus() {
|
||||||
$uri = PhabricatorEnv::getEnvConfig('notification.server-uri');
|
$uri = PhabricatorEnv::getEnvConfig('notification.server-uri');
|
||||||
$uri = new PhutilURI($uri);
|
$uri = id(new PhutilURI($uri))
|
||||||
|
->setPath('/status/');
|
||||||
$uri->setPath('/status/');
|
|
||||||
|
|
||||||
list($body) = id(new HTTPSFuture($uri))
|
list($body) = id(new HTTPSFuture($uri))
|
||||||
->setTimeout(3)
|
->setTimeout(3)
|
||||||
->resolvex();
|
->resolvex();
|
||||||
|
|
||||||
$status = json_decode($body, true);
|
$status = phutil_json_decode($body);
|
||||||
if (!is_array($status)) {
|
if (!is_array($status)) {
|
||||||
throw new Exception(
|
throw new Exception(
|
||||||
pht(
|
pht(
|
||||||
|
|
|
@ -37,8 +37,8 @@ final class PhabricatorAphlictSetupCheck extends PhabricatorSetupCheck {
|
||||||
->addRelatedPhabricatorConfig('notification.server-uri')
|
->addRelatedPhabricatorConfig('notification.server-uri')
|
||||||
->addCommand(
|
->addCommand(
|
||||||
pht(
|
pht(
|
||||||
"(To start the server, run this command.)\n".
|
"(To start the server, run this command.)\n%s",
|
||||||
"phabricator/ $ ./bin/aphlict start"));
|
'phabricator/ $ ./bin/aphlict start'));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue