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()) {