From 16b11a4c19c00ad14e5856cfd51da8f831513086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 17 Aug 2021 19:04:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Mysql/PDO.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Mysql/PDO.php b/src/Mysql/PDO.php index 9a13617..f8a0ec2 100644 --- a/src/Mysql/PDO.php +++ b/src/Mysql/PDO.php @@ -6,11 +6,15 @@ use Exception; use Http\Context\Context; use Kiri\Events\EventProvider; use Kiri\Kiri; +use Kiri\Pool\StopHeartbeatCheck; use PDOStatement; use Server\Events\OnWorkerExit; use Swoole\Timer; -class PDO +/** + * + */ +class PDO implements StopHeartbeatCheck { const DB_ERROR_MESSAGE = 'The system is busy, please try again later.'; @@ -76,7 +80,6 @@ class PDO try { if (env('state') == 'exit') { echo 'timer end.' . PHP_EOL; - $this->stopHeartbeatCheck(); } if (time() - $this->_last > 10 * 60) { $this->stopHeartbeatCheck();