From 50143f3ce40d5eb2bd1a1d9189a56c1d405c0925 Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Thu, 5 Jan 2023 00:42:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20=E5=BF=83=E8=B7=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Support/Cluster.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Support/Cluster.php b/app/Support/Cluster.php index f69d98d..0427235 100644 --- a/app/Support/Cluster.php +++ b/app/Support/Cluster.php @@ -32,6 +32,7 @@ public static function publish($event, $data = []): void 'type' => config('settings.node.type'), 'id' => config('settings.node.id'), 'ip' => config('settings.node.ip'), + 'last_heartbeat' => time(), ], 'data' => $data, ])); @@ -107,6 +108,8 @@ public static function registerThisNode(): void 'type' => config('settings.node.type'), 'id' => $node_id, 'ip' => config('settings.node.ip'), + // utc +8 timestamp + 'last_heartbeat' => time(), ]); Cluster::publish('node.ok');