Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/storage/lisk/PhabricatorLiskDAO.php
Show First 20 Lines • Show All 95 Lines • ▼ Show 20 Lines | protected function establishLiveConnection($mode) { | ||||
return $connection; | return $connection; | ||||
} | } | ||||
private function newBasicConnection($database, $mode, $namespace) { | private function newBasicConnection($database, $mode, $namespace) { | ||||
$conf = PhabricatorEnv::newObjectFromConfig( | $conf = PhabricatorEnv::newObjectFromConfig( | ||||
'mysql.configuration-provider', | 'mysql.configuration-provider', | ||||
array($this, $mode, $namespace)); | array($this, $mode, $namespace)); | ||||
return PhabricatorEnv::newObjectFromConfig( | return PhabricatorDatabaseRef::newRawConnection( | ||||
'mysql.implementation', | |||||
array( | |||||
array( | array( | ||||
'user' => $conf->getUser(), | 'user' => $conf->getUser(), | ||||
'pass' => $conf->getPassword(), | 'pass' => $conf->getPassword(), | ||||
'host' => $conf->getHost(), | 'host' => $conf->getHost(), | ||||
'port' => $conf->getPort(), | 'port' => $conf->getPort(), | ||||
'database' => $database, | 'database' => $database, | ||||
'retries' => 3, | 'retries' => 3, | ||||
'timeout' => 10, | 'timeout' => 10, | ||||
), | |||||
)); | )); | ||||
} | } | ||||
private function newClusterConnection($application, $database, $mode) { | private function newClusterConnection($application, $database, $mode) { | ||||
$master = PhabricatorDatabaseRef::getMasterDatabaseRefForApplication( | $master = PhabricatorDatabaseRef::getMasterDatabaseRefForApplication( | ||||
$application); | $application); | ||||
if ($master && !$master->isSevered()) { | if ($master && !$master->isSevered()) { | ||||
▲ Show 20 Lines • Show All 236 Lines • Show Last 20 Lines |