This commit is contained in:
as2252258@163.com
2021-03-26 01:28:10 +08:00
parent 6c1bbc2c0f
commit 8b57da2ba5
+3 -6
View File
@@ -32,17 +32,14 @@ class Consumer extends Process
while (true) {
[$value, $startTime] = swoole_unserialize($process->read());
$crontab = $redis->get($value);
$crontab = swoole_unserialize($redis->get($value));
$redis->del($value);
var_dump($crontab);
if (empty($crontab) || !($crontab = swoole_unserialize($crontab))) {
if (!is_object($crontab)) {
continue;
}
Coroutine::create(function (Crontab $value, int $startTime) {
$this->dispatch($value);
}, $crontab, $startTime);
$this->dispatch($crontab);
}
}