Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93658107
PhabricatorMySQLSearchHost.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
Sat, Nov 30, 12:29
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Dec 2, 12:29 (2 d)
Engine
blob
Format
Raw Data
Handle
22683307
Attached To
rPH Phabricator
PhabricatorMySQLSearchHost.php
View Options
<?php
final
class
PhabricatorMySQLSearchHost
extends
PhabricatorSearchHost
{
public
function
setConfig
(
$config
)
{
$this
->
setRoles
(
idx
(
$config
,
'roles'
,
array
(
'read'
=>
true
,
'write'
=>
true
)));
return
$this
;
}
public
function
getDisplayName
()
{
return
'MySQL'
;
}
public
function
getStatusViewColumns
()
{
return
array
(
pht
(
'Protocol'
)
=>
'mysql'
,
pht
(
'Roles'
)
=>
implode
(
', '
,
array_keys
(
$this
->
getRoles
())),
);
}
public
function
getProtocol
()
{
return
'mysql'
;
}
public
function
getHealthRecord
()
{
if
(!
$this
->
healthRecord
)
{
$ref
=
PhabricatorDatabaseRef
::
getMasterDatabaseRefForApplication
(
'search'
);
$this
->
healthRecord
=
$ref
->
getHealthRecord
();
}
return
$this
->
healthRecord
;
}
public
function
getConnectionStatus
()
{
PhabricatorDatabaseRef
::
queryAll
();
$ref
=
PhabricatorDatabaseRef
::
getMasterDatabaseRefForApplication
(
'search'
);
$status
=
$ref
->
getConnectionStatus
();
return
$status
;
}
}
Event Timeline
Log In to Comment