This commit is contained in:
2020-09-04 19:00:27 +08:00
parent 30d805f41d
commit 4f8db41ca1
3 changed files with 11 additions and 11 deletions
+3 -3
View File
@@ -40,7 +40,7 @@ class Redis extends Pool
if (Context::hasContext($coroutineName)) {
return Context::getContext($coroutineName);
} else if (!$this->hasItem($coroutineName)) {
$this->success('create redis client -> ' . $config['host'] . ':' . $this->hasLength($coroutineName));
$this->success('create redis client -> ' . $config['host'] . ':' . $this->size($coroutineName));
return $this->saveClient($coroutineName, $this->createConnect($config));
}
return $this->getByChannel($coroutineName, $config);
@@ -55,9 +55,9 @@ class Redis extends Pool
*/
public function getByChannel($coroutineName, $config)
{
$this->info('redis client has :' . $this->hasLength($coroutineName));
$this->info('redis client has :' . $this->size($coroutineName));
if (!$this->hasItem($coroutineName)) {
$this->success('create redis client -> ' . $config['host'] . ':' . $this->hasLength($coroutineName));
$this->success('create redis client -> ' . $config['host'] . ':' . $this->size($coroutineName));
return $this->saveClient($coroutineName, $this->createConnect($config));
}
[$time, $client] = $this->get($coroutineName, -1);