From 451491e928f6ece3c54812ea232cfacbb0522f10 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Fri, 26 Mar 2021 02:07:05 +0800 Subject: [PATCH] modify --- System/Crontab/Consumer.php | 2 +- System/Crontab/CrontabZookeeperProcess.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/System/Crontab/Consumer.php b/System/Crontab/Consumer.php index 390d1db5..506929ff 100644 --- a/System/Crontab/Consumer.php +++ b/System/Crontab/Consumer.php @@ -70,7 +70,7 @@ class Consumer extends Process */ public function tick(\Swoole\Process $process) { - [$value, $startTime] = swoole_unserialize($process->read()); + $value = $process->read(40); $redis = Snowflake::app()->getRedis(); diff --git a/System/Crontab/CrontabZookeeperProcess.php b/System/Crontab/CrontabZookeeperProcess.php index 458a4963..7e0a5c5b 100644 --- a/System/Crontab/CrontabZookeeperProcess.php +++ b/System/Crontab/CrontabZookeeperProcess.php @@ -60,7 +60,7 @@ class CrontabZookeeperProcess extends Process $consumer = Snowflake::app()->get(Consumer::class); foreach ($range as $value) { - $consumer->write(swoole_serialize(['crontab:' . md5($value), $startTime])); + $consumer->write('crontab:' . md5($value)); } $redis->release(); });