diff --git a/functions.php b/functions.php index ab1b104..84e8759 100644 --- a/functions.php +++ b/functions.php @@ -12,7 +12,7 @@ function ping_redis() { else return false; } -function check_redis($group="scheduler_in") { +function check_redis($group="scheduler_in", $key="") { global $REDIS_HOST; @@ -23,6 +23,8 @@ function check_redis($group="scheduler_in") { //print_r($members); foreach ($members as $member) { + if ($key!="" && $member!=$key) continue; // check a specific key in a group + $value = $redis->get($member); $json_data = base64_decode($value); $data = json_decode($json_data,true); diff --git a/install.php b/install.php index 9d5da35..9a65969 100644 --- a/install.php +++ b/install.php @@ -28,10 +28,11 @@ if ($_POST["ADDITIONALS"]=="yes") { $json = json_encode($_POST, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT); //echo $json; -$op = "install:".date("YmdHis"); -redis_set($op,$json); +// TODO preview about selected options? +// TODO - new install in progress? -//echo redis_get($op); +$key = "install:".date("YmdHis"); +redis_set($key,$json); /* put_install_envs(); @@ -45,3 +46,66 @@ echo "
".$output.""; */ ?> + + + + + + +