From d353e019dfcdb1e2f151e2d335dab2ab67dbfb0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 7 Jun 2021 11:49:24 +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/Producer.php | 2 +- System/Crontab/Zookeeper.php | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/System/Crontab/Producer.php b/System/Crontab/Producer.php index fa7b5645..7769d0ad 100644 --- a/System/Crontab/Producer.php +++ b/System/Crontab/Producer.php @@ -16,7 +16,7 @@ use Snowflake\Snowflake; class Producer extends Component { - const CRONTAB_KEY = '_application:system:crontab'; + const CRONTAB_KEY = '_application:{crontab}:system:crontab'; /** diff --git a/System/Crontab/Zookeeper.php b/System/Crontab/Zookeeper.php index 2e585b53..612bb41c 100644 --- a/System/Crontab/Zookeeper.php +++ b/System/Crontab/Zookeeper.php @@ -118,11 +118,14 @@ class Zookeeper extends Process */ private function loadCarobTask(Redis|\Redis $redis): array { - $range = $redis->zRangeByScore(Producer::CRONTAB_KEY, '0', (string)time()); + $script = <<