Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F119751049
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
Sun, Jun 29, 03:54
Size
693 B
Mime Type
text/x-php
Expires
Tue, Jul 1, 03:54 (2 d)
Engine
blob
Format
Raw Data
Handle
27068464
Attached To
rPH Phabricator
PhabricatorNotificationClient.php
View Options
<?php
final
class
PhabricatorNotificationClient
extends
Phobject
{
public
static
function
tryAnyConnection
()
{
$servers
=
PhabricatorNotificationServerRef
::
getEnabledAdminServers
();
if
(!
$servers
)
{
return
;
}
foreach
(
$servers
as
$server
)
{
$server
->
loadServerStatus
();
return
;
}
return
;
}
public
static
function
tryToPostMessage
(
array
$data
)
{
$servers
=
PhabricatorNotificationServerRef
::
getEnabledAdminServers
();
shuffle
(
$servers
);
foreach
(
$servers
as
$server
)
{
try
{
$server
->
postMessage
(
$data
);
return
;
}
catch
(
Exception
$ex
)
{
// Just ignore any issues here.
}
}
}
}
Event Timeline
Log In to Comment