1
0
Fork 0
mirror of synced 2024-06-29 19:50:26 +12:00

Update Cache Test

This commit is contained in:
Bradley Schofield 2021-10-18 16:08:50 +01:00
parent 7540dafa9b
commit aca61d1902

View file

@ -71,9 +71,14 @@ App::get('/v1/health/cache')
->action(function ($response, $utopia) {
/** @var Appwrite\Utopia\Response $response */
/** @var Utopia\App $utopia */
$utopia->getResource('cache');
/** @var Redis */
$redis = $utopia->getResource('cache');
$response->json(['status' => 'OK']);
if ($redis->ping(true)) {
return $response->json(['status' => 'OK']);
} else {
throw new Exception('Cache is not available', 500);
}
});
App::get('/v1/health/time')