...
|
...
|
@@ -28,18 +28,7 @@ function start(){ |
|
|
$pool->shutdown();
|
|
|
}
|
|
|
|
|
|
// 每秒检查一次是否空闲redis
|
|
|
foreach (\Lib\RedisPool::$instance as $redis){
|
|
|
if(time()-5 > $redis->lastTimer ){
|
|
|
$redis->close();
|
|
|
}
|
|
|
}
|
|
|
// 空闲超过10秒的db链接,关闭
|
|
|
foreach (\Lib\DbPool::$instance as $db){
|
|
|
if(time()-10 > $db->lastTimer ){
|
|
|
$db->close();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
//
|
|
|
\Lib\Log::getInstance()->write();
|
...
|
...
|
|