From a672522d3be0ea92ccc4be272cffda4be1af2825 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 14 Apr 2021 14:44:16 +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 | 14 +------------- System/Crontab/Producer.php | 2 -- System/Crontab/Zookeeper.php | 1 - 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/System/Crontab/Crontab.php b/System/Crontab/Crontab.php index aa3f6b1b..9edb6d4c 100644 --- a/System/Crontab/Crontab.php +++ b/System/Crontab/Crontab.php @@ -24,7 +24,7 @@ abstract class Crontab extends BaseObject private string $name = ''; - private mixed $params = null; + private mixed $params = []; private int $tickTime = 1; @@ -42,18 +42,6 @@ abstract class Crontab extends BaseObject private int $execute_number = 0; - private bool $_stop = false; - - - /** - * - */ - public function stop() - { - $this->_stop = true; - } - - /** * @return $this */ diff --git a/System/Crontab/Producer.php b/System/Crontab/Producer.php index 2435f57b..1d1d7f7a 100644 --- a/System/Crontab/Producer.php +++ b/System/Crontab/Producer.php @@ -33,8 +33,6 @@ class Producer extends Component $tickTime = time() + $crontab->getTickTime(); - var_export($crontab); - $redis->zAdd(self::CRONTAB_KEY, $tickTime, $name); } diff --git a/System/Crontab/Zookeeper.php b/System/Crontab/Zookeeper.php index 9a252254..dea6aca3 100644 --- a/System/Crontab/Zookeeper.php +++ b/System/Crontab/Zookeeper.php @@ -65,7 +65,6 @@ class Zookeeper extends Process */ private function dispatch($server, Redis|\Redis $redis, int $setting, $value) { - var_export($value); $server->sendMessage(swoole_serialize([ 'action' => 'crontab', 'handler' => swoole_unserialize($redis->get('crontab:' . $value)) ]), random_int(0, $setting - 1));