Skip to content

Commit d5d8be2

Browse files
add /health endpoint
1 parent 9a69ea8 commit d5d8be2

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

backend/server.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ def _voltages(gs, debug=False) -> list[float]:
269269
allow_headers=["*"],
270270
)
271271

272+
273+
272274
class PowerflowRequest(BaseModel):
273275
substationVoltage: float = 1.05
274276
numBuses: int = 13
@@ -295,6 +297,9 @@ def health():
295297
return {"status": "ok", "data_ready": _DATA_DIR.exists(),
296298
"message": "gpu2grid OpenDSS server"}
297299

300+
@app.get("/health")
301+
def health():
302+
return "OK"
298303

299304

300305
"""Return available traces"""

0 commit comments

Comments
 (0)