This commit is contained in:
as2252258@163.com
2021-09-06 02:03:19 +08:00
parent 95340d6d37
commit 33dab9dd5e
+4 -2
View File
@@ -3,6 +3,7 @@
namespace Kiri\Cache\Base;
use Http\Context\Context;
use Kiri\Abstracts\Logger;
use Kiri\Events\EventProvider;
use Kiri\Exception\RedisConnectException;
use Kiri\Kiri;
@@ -73,8 +74,9 @@ class Redis implements StopHeartbeatCheck
$this->_timer = Timer::tick(1000, function () {
try {
if (env('state','start') == 'exit') {
echo 'timer end.' . PHP_EOL;
}
Kiri::getDi()->get(Logger::class)->critical('timer end');
$this->stopHeartbeatCheck();
}
if (time() - $this->_last > 10 * 60) {
$this->stopHeartbeatCheck();
$this->pdo = null;