改名
This commit is contained in:
+11
-5
@@ -47,14 +47,20 @@ class Redis extends Component
|
||||
*/
|
||||
public function createPool()
|
||||
{
|
||||
$connections = Snowflake::app()->pool->redis;
|
||||
try {
|
||||
$connections = Snowflake::app()->pool->redis;
|
||||
|
||||
$config = $this->get_config();
|
||||
$name = $config['host'] . ':' . $config['prefix'] . ':' . $config['databases'];
|
||||
$config = $this->get_config();
|
||||
$name = $config['host'] . ':' . $config['prefix'] . ':' . $config['databases'];
|
||||
|
||||
$length = env('REDIS.POOL_LENGTH', 100);
|
||||
$length = env('REDIS.POOL_LENGTH', 100);
|
||||
|
||||
$connections->initConnections('redis:' . $name, true, $length);
|
||||
$connections->initConnections('redis:' . $name, true, $length);
|
||||
} catch (\Throwable $exception) {
|
||||
var_dump($exception->getMessage());
|
||||
var_dump($exception->getFile());
|
||||
var_dump($exception->getLine());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -413,7 +413,7 @@ class Connection extends Pool
|
||||
public function desc(string $name)
|
||||
{
|
||||
if (!isset($this->hasCreate[$name])) {
|
||||
return;
|
||||
$this->hasCreate[$name] = 0;
|
||||
}
|
||||
$this->hasCreate[$name] -= 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user