diff --git a/app/Console/Commands/Cluster/Work.php b/app/Console/Commands/Cluster/Work.php index c5e1666..370e582 100644 --- a/app/Console/Commands/Cluster/Work.php +++ b/app/Console/Commands/Cluster/Work.php @@ -158,7 +158,7 @@ private function report(): void while (1) { ClusterSupport::publish('system_usage', [ 'cpu' => $cpu, - ]); + ], true); sleep(1); } diff --git a/app/Support/ClusterSupport.php b/app/Support/ClusterSupport.php index 71b36ad..dde9d54 100644 --- a/app/Support/ClusterSupport.php +++ b/app/Support/ClusterSupport.php @@ -23,7 +23,7 @@ public static function isSlave(): bool 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 */ Redis::publish('cluster_ready', json_encode([