改进 清理规则

This commit is contained in:
iVampireSP.com 2023-01-20 00:59:08 +08:00
parent d2e1cc23ef
commit 2cf7cbc624
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -56,20 +56,16 @@ public function handle(): void
return; return;
} }
if ($clients) {
// 循环翻页
for ($i = 1; $i <= $clients['meta']['count']; $i++) {
try {
$clients = $emqx->clients([$query => $this->username, 'page' => $i]);
} catch (EmqxSupportException $e) {
Log::error('emqx connect failed.', [$e]);
continue;
}
if ($clients) {
if (count($clients['data']) > 0) {
foreach ($clients['data'] as $client) { foreach ($clients['data'] as $client) {
dispatch(new self($client['clientid'], null)); dispatch(new self($client['clientid'], null));
} }
}
dispatch(new self(null, $this->username, $this->like_username));
}
} }
} }
} }