redis edit

This commit is contained in:
ASUS 2025-10-13 14:46:45 +08:00
parent e7ee70233f
commit 1daf66fdea
1 changed files with 1 additions and 3 deletions

View File

@ -173,11 +173,9 @@ class Events
$number = $message['number'];
try {
$redis = self::$redis;
$redis->connect(Redis::$redis_host, 6379);
$redis->auth(Redis::$password);
$redis->select(3);
$red_number = $redis->get('shop:' . $message['shop_id'] . ':product-stock:' . $message['product_id']);
}catch (\RedisException $e) {
}catch (\Exception $e) {
print_r( "Redis 错误: " . $e->getMessage() . "\r\n");
}
$redis->close();