改名
This commit is contained in:
@@ -63,14 +63,13 @@ class Zookeeper extends Process
|
|||||||
*/
|
*/
|
||||||
public function onHandler(\Swoole\Process $process): void
|
public function onHandler(\Swoole\Process $process): void
|
||||||
{
|
{
|
||||||
$ticker = Config::get('crontab.ticker', 100) / 1000;
|
|
||||||
$redis = Snowflake::app()->getRedis();
|
$redis = Snowflake::app()->getRedis();
|
||||||
while (true) {
|
while (true) {
|
||||||
$range = $this->loadCarobTask($redis);
|
$range = $this->loadCarobTask($redis);
|
||||||
foreach ($range as $value) {
|
foreach ($range as $value) {
|
||||||
$this->dispatch($redis, $value);
|
$this->dispatch($redis, $value);
|
||||||
}
|
}
|
||||||
Coroutine::sleep($ticker);
|
Coroutine::sleep(100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user