File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change 22
33import httpx
44
5- from shellsmith import api
5+ from shellsmith import Client , api
66from shellsmith .config import config
77from shellsmith .extract import collect_submodel_ids
88
@@ -133,15 +133,8 @@ def health(timeout: float = 0.1, host: str = config.host) -> str:
133133 Returns:
134134 "UP" if the service is reachable, otherwise "DOWN".
135135 """
136- url = f"{ host } /actuator/health"
137-
138- try :
139- response = httpx .get (url , timeout = timeout )
140- response .raise_for_status ()
141- data = response .json ()
142- return data ["status" ]
143- except httpx .RequestError :
144- return "DOWN"
136+ with Client (host = host ) as client :
137+ client .get_health_status ()
145138
146139
147140def find_unreferenced_submodels (host : str = config .host ) -> list [str ]:
You can’t perform that action at this time.
0 commit comments