改名
This commit is contained in:
+2
-1
@@ -3,6 +3,7 @@
|
|||||||
namespace Database\Mysql;
|
namespace Database\Mysql;
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
|
use Kiri\Abstracts\Config;
|
||||||
use Kiri\Abstracts\Logger;
|
use Kiri\Abstracts\Logger;
|
||||||
use Kiri\Kiri;
|
use Kiri\Kiri;
|
||||||
use Kiri\Pool\StopHeartbeatCheck;
|
use Kiri\Pool\StopHeartbeatCheck;
|
||||||
@@ -82,7 +83,7 @@ class PDO implements StopHeartbeatCheck
|
|||||||
Kiri::getDi()->get(Logger::class)->critical('timer end');
|
Kiri::getDi()->get(Logger::class)->critical('timer end');
|
||||||
$this->stopHeartbeatCheck();
|
$this->stopHeartbeatCheck();
|
||||||
}
|
}
|
||||||
if (time() - $this->_last > 10 * 60) {
|
if (time() - $this->_last > (int)Config::get('databases.pool.tick',60)) {
|
||||||
$this->stopHeartbeatCheck();
|
$this->stopHeartbeatCheck();
|
||||||
$this->pdo = null;
|
$this->pdo = null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user