改进 集群

This commit is contained in:
iVampireSP.com 2023-02-08 14:26:20 +08:00
parent 302d091e3a
commit 0b585ccdbf
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132
2 changed files with 2 additions and 2 deletions

View File

@ -158,7 +158,7 @@ private function report(): void
while (1) { while (1) {
ClusterSupport::publish('system_usage', [ ClusterSupport::publish('system_usage', [
'cpu' => $cpu, 'cpu' => $cpu,
]); ], true);
sleep(1); sleep(1);
} }

View File

@ -23,7 +23,7 @@ public static function isSlave(): bool
return config('settings.node.type') === 'slave'; return config('settings.node.type') === 'slave';
} }
public static function publish($event, $data = [], $register = true): void public static function publish($event, $data = [], $register = false): void
{ {
/** @noinspection PhpUndefinedMethodInspection */ /** @noinspection PhpUndefinedMethodInspection */
Redis::publish('cluster_ready', json_encode([ Redis::publish('cluster_ready', json_encode([