check install in progress
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user