redis check
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
root
2024-08-05 19:29:52 +02:00
parent 74e162ff60
commit 46e7d51010
2 changed files with 14 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
<?php <?php
$REDIS_HOST='redis'; $REDIS_HOST='redis-server';
function ping_redis() { function ping_redis() {

View File

@@ -1,9 +1,19 @@
<?php <?php
include "functions.php";
switch ($_GET["op"]) { switch ($_GET["op"]) {
"redis": case "redis":
echo ping_redis(); try {
"docker": $ret = ping_redis();
if ($ret===false) {
echo "Can't ping redis-server";
}
else echo true;
} catch (RedisException $e) {
echo "RedisException caught: " . $e->getMessage();
}
break;
case "docker":
echo true; echo true;
break; break;