From 0b846865c933b20775b17067db8a89ef6da12701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 23 Jul 2021 18:12:46 +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 --- System/Crontab/Crontab.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/System/Crontab/Crontab.php b/System/Crontab/Crontab.php index 228e7056..e9af42f4 100644 --- a/System/Crontab/Crontab.php +++ b/System/Crontab/Crontab.php @@ -202,6 +202,9 @@ abstract class Crontab implements PipeMessage $redis->hSet(self::WAIT_END, $name_md5, static::getSerialize($this)); call_user_func([$this, 'process']); + + $this->execute_number += 1; + $redis->hDel(self::WAIT_END, $name_md5); } catch (\Throwable $throwable) { $this->application->addError($throwable, 'throwable'); @@ -214,8 +217,7 @@ abstract class Crontab implements PipeMessage */ public function afterExecute() { - $aot = $this->isRecover(); - if ($aot !== 999) { + if ($this->isRecover() !== 999) { return; } $redis = $this->application->getRedis();