改进 Nodes
This commit is contained in:
parent
c04c83ec67
commit
d3eef1b4a6
@ -26,6 +26,11 @@ public function module_reports(Request $request)
|
|||||||
public function nodes() {
|
public function nodes() {
|
||||||
$nodes = Cluster::nodes(true);
|
$nodes = Cluster::nodes(true);
|
||||||
|
|
||||||
return $this->success($nodes);
|
$current_node_id = Cluster::currentNode()['id'];
|
||||||
|
|
||||||
|
return $this->success([
|
||||||
|
'nodes' => $nodes,
|
||||||
|
'current_node_id' => $current_node_id,
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -142,4 +142,9 @@ public static function registerThisNode($report = true): void
|
|||||||
Cluster::publish('node.ok');
|
Cluster::publish('node.ok');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function currentNode()
|
||||||
|
{
|
||||||
|
return config('settings.node');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user