1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2025-12-21 22:01:31 +00:00

migrate from redis to valkey

This commit is contained in:
FreddleSpl0it
2025-02-28 15:36:19 +01:00
parent 35a6f81d0d
commit c27000215e
80 changed files with 754 additions and 753 deletions

View File

@@ -8,7 +8,7 @@ header('Content-Type: application/json');
error_reporting(0);
function api_log($_data) {
global $redis;
global $valkey;
$data_var = array();
foreach ($_data as $data => &$value) {
if ($data == 'csrf_token') {
@@ -36,12 +36,12 @@ function api_log($_data) {
'remote' => get_remote_ip(),
'data' => implode(', ', $data_var)
);
$redis->lPush('API_LOG', json_encode($log_line));
$valkey->lPush('API_LOG', json_encode($log_line));
}
catch (RedisException $e) {
$_SESSION['return'][] = array(
'type' => 'danger',
'msg' => 'Redis: '.$e
'msg' => 'Valkey: '.$e
);
return false;
}