This commit is contained in:
2023-02-07 16:46:13 +08:00
parent a9472ff0a3
commit 4f341594b5
4 changed files with 27 additions and 46 deletions
+2 -2
View File
@@ -82,7 +82,7 @@ class Helper implements StopHeartbeatCheck
/**
* @return \Redis
* @throws RedisConnectException
* @throws Exception
* @throws RedisException
*/
public function _pdo(): \Redis
@@ -96,7 +96,7 @@ class Helper implements StopHeartbeatCheck
/**
* @return \Redis
* @throws RedisConnectException
* @throws Exception
*/
private function newClient(): \Redis
{
+2 -1
View File
@@ -91,6 +91,7 @@ class Redis extends Component
* @param $key
* @param int $timeout
* @return bool
* @throws \RedisException
*/
public function waite($key, int $timeout = 5): bool
{
@@ -189,7 +190,7 @@ SCRIPT;
$config = $this->get_config();
return $this->pool->get($config['host'], static function () use ($config) {
return new Helper($config);
}, 10);
});
}