From 9433d631a99014faf485ae5ad62a358e2ce10fed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 11 Sep 2020 14:46:56 +0800 Subject: [PATCH] e --- Queue/Queue.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Queue/Queue.php b/Queue/Queue.php index a7877f2e..1ec5bbc3 100644 --- a/Queue/Queue.php +++ b/Queue/Queue.php @@ -53,12 +53,10 @@ class Queue extends \Snowflake\Process\Process /** * @param Process $process - * @throws ComponentException - * @throws ConfigException */ public function onHandler(Process $process) { - do { + Timer::tick(50, function () { $redis = Snowflake::app()->getRedis(); try { if ($this->shutdown) { @@ -75,7 +73,7 @@ class Queue extends \Snowflake\Process\Process } finally { $redis->release(); } - } while (true); + }); }