This commit is contained in:
2021-04-27 11:51:38 +08:00
parent ebb3d4c96e
commit 9044547ef0
+1 -2
View File
@@ -63,14 +63,13 @@ class Zookeeper extends Process
*/
public function onHandler(\Swoole\Process $process): void
{
$ticker = Config::get('crontab.ticker', 100) / 1000;
$redis = Snowflake::app()->getRedis();
while (true) {
$range = $this->loadCarobTask($redis);
foreach ($range as $value) {
$this->dispatch($redis, $value);
}
Coroutine::sleep($ticker);
Coroutine::sleep(100);
}
}