check install in progress
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
root
2024-08-16 13:43:47 +02:00
parent f4e7c16568
commit 729dfd321f
3 changed files with 33 additions and 5 deletions

View File

@@ -12,6 +12,28 @@ function ping_redis() {
else return false;
}
function check_install() {
global $REDIS_HOST;
$redis = new Redis();
$redis->connect($REDIS_HOST);
if ($redis->ping()) {
$members = $redis->sMembers("web_in"); // redis-cli -h redis-server smembers $group
print_r($members);
$in_progress=0;
foreach ($members as $member) {
echo substr($member,0,7);
if (substr($member,0,7)=="install") {
$in_progress=$member;
break;
}
}
return $in_progress;
}
}
function check_redis($group="scheduler_in", $key="") {
global $REDIS_HOST;