改名
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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user