Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F109930894
PhabricatorNotificationClient.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Apr 24, 00:50
Size
584 B
Mime Type
text/x-php
Expires
Sat, Apr 26, 00:50 (2 d)
Engine
blob
Format
Raw Data
Handle
25737016
Attached To
rPH Phabricator
PhabricatorNotificationClient.php
View Options
<?php
final
class
PhabricatorNotificationClient
{
const
EXPECT_VERSION
=
2
;
public
static
function
getServerStatus
()
{
$uri
=
PhabricatorEnv
::
getEnvConfig
(
'notification.server-uri'
);
$uri
=
new
PhutilURI
(
$uri
);
$uri
->
setPath
(
'/status/'
);
list
(
$body
)
=
id
(
new
HTTPSFuture
(
$uri
))
->
setTimeout
(
3
)
->
resolvex
();
$status
=
json_decode
(
$body
,
true
);
if
(!
is_array
(
$status
))
{
throw
new
Exception
(
pht
(
'Expected JSON response from notification server, received: %s'
,
$body
));
}
return
$status
;
}
}
Event Timeline
Log In to Comment