From e6a051c6df8e20348b4a77b0209800e5737c2680 Mon Sep 17 00:00:00 2001 From: Meezaan-ud-Din Date: Wed, 3 Apr 2019 16:10:10 +0100 Subject: [PATCH] Change to galera --- routes/status/v1/status.php | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/routes/status/v1/status.php b/routes/status/v1/status.php index 63cb809..04aab35 100644 --- a/routes/status/v1/status.php +++ b/routes/status/v1/status.php @@ -19,30 +19,11 @@ } catch (Exception $e) { $dbResult = false; } - try { - $db2 = $dbx->getConnection('database_slave'); - $db2Result = $db2->fetchAssoc("SELECT id - FROM geolocate WHERE - city = ? AND countryiso = ?", - ['Dubai', 'AE']); - - if ($mc !== false) { - if ($dbResult !== false) { - $mc->set('DB_CONNECTION', 'database'); - } else { - $mc->set('DB_CONNECTION', 'database_slave'); - } - } - } catch (Exception $e) { - $db2Result = false; - } $status = [ 'memcached' => $mc === false ? 'NOT OK' : 'OK', - 'perconaMaster' => $dbResult === false ? 'NOT OK' : 'OK', - 'perconaSlave' => $db2Result === false ? 'NOT OK' : 'OK', - 'activeDb' => $mc === false ? 'NOT OK' : $mc->get('DB_CONNECTION') - ]; + 'galeraCluster' => $dbResult === false ? 'NOT OK' : 'OK', + ]; if ($mc === false || $dbResult === false || $db2Result === false) { return $response->withJson(ApiResponse::build($status, 500, 'Status Check Failed'), 500);