From 6332e9e25177f0a614a126d18efe87a118978a60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 23 Apr 2021 12:19:10 +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/Zookeeper.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/System/Crontab/Zookeeper.php b/System/Crontab/Zookeeper.php index 0f0c8b84..19bba017 100644 --- a/System/Crontab/Zookeeper.php +++ b/System/Crontab/Zookeeper.php @@ -61,13 +61,14 @@ class Zookeeper extends Process */ public function onHandler(\Swoole\Process $process): void { + $ticker = Config::get('crontab.ticker', 50) / 1000; $redis = Snowflake::app()->getRedis(); while (true) { $range = $this->loadCarobTask($redis); foreach ($range as $value) { $this->dispatch($redis, $value); } - Coroutine::sleep(200); + Coroutine::sleep($ticker); } }