Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / infrastructure / cluster / search / PhabricatorMySQLSearchHost.php
blob742b5713d3ceda6c8a1103a74d7dc906d5951cb4
1 <?php
3 final class PhabricatorMySQLSearchHost
4 extends PhabricatorSearchHost {
6 public function setConfig($config) {
7 $this->setRoles(idx($config, 'roles',
8 array('read' => true, 'write' => true)));
9 return $this;
12 public function getDisplayName() {
13 return 'MySQL';
16 public function getStatusViewColumns() {
17 return array(
18 pht('Protocol') => 'mysql',
19 pht('Roles') => implode(', ', array_keys($this->getRoles())),
23 public function getProtocol() {
24 return 'mysql';
27 public function getHealthRecord() {
28 if (!$this->healthRecord) {
29 $ref = PhabricatorDatabaseRef::getMasterDatabaseRefForApplication(
30 'search');
31 $this->healthRecord = $ref->getHealthRecord();
33 return $this->healthRecord;
36 public function getConnectionStatus() {
37 PhabricatorDatabaseRef::queryAll();
38 $ref = PhabricatorDatabaseRef::getMasterDatabaseRefForApplication('search');
39 $status = $ref->getConnectionStatus();
40 return $status;