From d99d0de64638dd5c2104583ae1b6b0cc1cddb795 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 16 Apr 2021 15:43:50 +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 +++--- System/Crontab/Zookeeper.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/System/Crontab/Crontab.php b/System/Crontab/Crontab.php index 0a417e39..fe76e398 100644 --- a/System/Crontab/Crontab.php +++ b/System/Crontab/Crontab.php @@ -207,9 +207,9 @@ abstract class Crontab extends BaseObject */ public function execute(): void { - \Swoole\Coroutine\go(function ($application) { - $application->isRecover($application); - }, $this); + defer(function () { + $this->isRecover(); + }); $this->run(); } diff --git a/System/Crontab/Zookeeper.php b/System/Crontab/Zookeeper.php index 4ee7320f..1e9426a7 100644 --- a/System/Crontab/Zookeeper.php +++ b/System/Crontab/Zookeeper.php @@ -24,7 +24,7 @@ class Zookeeper extends Process */ public function onHandler(\Swoole\Process $process): void { - /** @var \Snowflake\Crontab\Producer $crontab */ + /** @var Producer $crontab */ $crontab = Snowflake::app()->get('crontab'); $crontab->clearAll(); if (Snowflake::getPlatform()->isLinux()) {