From 8086a56bb3900964d03dced5cc9274956f057fcf Mon Sep 17 00:00:00 2001 From: "xiaolei.zl" Date: Mon, 23 Dec 2024 19:22:36 +0800 Subject: [PATCH] fix Committed-by: xiaolei.zl from Dev container --- coordinator/gscoordinator/flex/core/insight/groot.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/coordinator/gscoordinator/flex/core/insight/groot.py b/coordinator/gscoordinator/flex/core/insight/groot.py index 22fe79b02d91..973420b83830 100644 --- a/coordinator/gscoordinator/flex/core/insight/groot.py +++ b/coordinator/gscoordinator/flex/core/insight/groot.py @@ -100,18 +100,20 @@ def check_graph_exists(self, graph_id: str): def list_service_status(self) -> List[dict]: groot_endpoints = self._graph.groot_endpoints - return [ + res = [ { "graph_id": self._graph.id, "status": "Running", "start_time": CREATION_TIME, "sdk_endpoints": { "gremlin": groot_endpoints["gremlin_endpoint"], - "cypher": groot_endpoints["cypher_endpoint"], "grpc": groot_endpoints["grpc_endpoint"], }, } ] + if "cypher_endpoint" in res[0]: + res[0]["sdk_endpoints"]["cypher"] = groot_endpoints["cypher_endpoint"] + return res def create_graph(self, graph: dict) -> dict: raise RuntimeError("Create graph is not supported yet.")