改名
This commit is contained in:
@@ -47,7 +47,6 @@ class Redis extends Component
|
|||||||
*/
|
*/
|
||||||
public function createPool()
|
public function createPool()
|
||||||
{
|
{
|
||||||
try {
|
|
||||||
$connections = Snowflake::app()->pool->redis;
|
$connections = Snowflake::app()->pool->redis;
|
||||||
|
|
||||||
$config = $this->get_config();
|
$config = $this->get_config();
|
||||||
@@ -56,11 +55,6 @@ class Redis extends Component
|
|||||||
$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());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ class Connection extends Pool
|
|||||||
*/
|
*/
|
||||||
public function Heartbeat_detection($timer)
|
public function Heartbeat_detection($timer)
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
$this->creates = $timer;
|
$this->creates = $timer;
|
||||||
if ($this->lastTime == 0) {
|
if ($this->lastTime == 0) {
|
||||||
return;
|
return;
|
||||||
@@ -45,6 +46,11 @@ class Connection extends Pool
|
|||||||
} else if ($this->lastTime + 300 < time()) {
|
} else if ($this->lastTime + 300 < time()) {
|
||||||
$this->flush(2);
|
$this->flush(2);
|
||||||
}
|
}
|
||||||
|
} catch (\Throwable $exception) {
|
||||||
|
var_dump($exception->getMessage());
|
||||||
|
var_dump($exception->getFile());
|
||||||
|
var_dump($exception->getLine());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user