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

This commit is contained in:
root
2024-08-12 19:59:59 +02:00
parent e7f58109c2
commit 8399a6b3bb
4 changed files with 62 additions and 16 deletions

View File

@@ -8,11 +8,24 @@ switch ($_GET["op"]) {
if ($ret===false) {
echo "Can't ping redis-server";
}
else echo true;
else echo "OK";
} catch (RedisException $e) {
echo "RedisException caught: " . $e->getMessage();
}
break;
case "init":
$arr = array("STATUS" => 0);
$json = json_encode($arr, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT);
$op = "init:".date("YmdHis");
redis_set($op,$json);
break;
case "init_check":
$data = check_redis("web_out");
if ($data["STATUS"]==2) echo "NEW";
elseif ($data["STATUS"]==1) echo "EXISTS";
else echo "WAIT";
break;
case "docker":
echo true;
break;