redis edit
This commit is contained in:
parent
e7ee70233f
commit
1daf66fdea
|
|
@ -173,11 +173,9 @@ class Events
|
||||||
$number = $message['number'];
|
$number = $message['number'];
|
||||||
try {
|
try {
|
||||||
$redis = self::$redis;
|
$redis = self::$redis;
|
||||||
$redis->connect(Redis::$redis_host, 6379);
|
|
||||||
$redis->auth(Redis::$password);
|
|
||||||
$redis->select(3);
|
$redis->select(3);
|
||||||
$red_number = $redis->get('shop:' . $message['shop_id'] . ':product-stock:' . $message['product_id']);
|
$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");
|
print_r( "Redis 错误: " . $e->getMessage() . "\r\n");
|
||||||
}
|
}
|
||||||
$redis->close();
|
$redis->close();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue