shared directory init
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
root
2024-11-21 13:14:38 +01:00
parent 608f2afe9f
commit 8f48a99184
3 changed files with 80 additions and 9 deletions

View File

@@ -1,6 +1,8 @@
<?php
$REDIS_HOST='redis-server';
$SHARED_DIR = "shared";
$INTERFACE = "directory"; // redis OR directory
function ping_redis() {
@@ -117,7 +119,7 @@ function redis_set($key, $value) {
$redis->set($key, base64_encode($value));
$redis->sAdd('web_in', $key);
} else {
echo "Key already exist: $key";
//echo "Key already exist: $key";
}
}
}
@@ -278,4 +280,27 @@ function put_install_envs() {
}
}
function set_output($op,$output) {
global $SHARED_DIR;
redis_set($op,$output);
file_put_contents($SHARED_DIR."/".$op,$output);
return true;
}
function check_response($key="") {
$arr = check_redis("web_out",$key);
//$arr = check_files("web_out",$key);
return $arr;
}
function remove_response($key) {
redis_remove("$key");
}
?>