Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F105890994
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
Thu, Mar 20, 14:40
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Mar 22, 14:40 (2 d)
Engine
blob
Format
Raw Data
Handle
24976879
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