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');