This commit is contained in:
as2252258@163.com
2021-04-16 00:35:55 +08:00
parent 331ba228a3
commit 2e78fc73c7
2 changed files with 48 additions and 49 deletions
+3 -2
View File
@@ -43,7 +43,7 @@ class Zookeeper extends Process
if (Snowflake::getPlatform()->isLinux()) {
name($this->pid, 'Crontab zookeeper.');
}
Timer::tick(1000, function () {
while (true) {
[$range, $redis] = $this->loadCarobTask();
$server = Snowflake::app()->getSwoole();
@@ -52,7 +52,8 @@ class Zookeeper extends Process
$this->dispatch($server, $redis, $setting, $value);
}
$redis->release();
});
sleep(1);
}
}