Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101025530
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
Tue, Feb 4, 22:44
Size
693 B
Mime Type
text/x-php
Expires
Thu, Feb 6, 22:44 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24078882
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