feat: implement system/health endpoint

This currently does nothing but return true. This can be used
as a ping endpoint to see if the API is running and reachable.
This commit is contained in:
fusion44 2024-02-20 19:56:11 +01:00
parent 18c66f44f4
commit 40880154eb
No known key found for this signature in database
6 changed files with 68 additions and 2 deletions

View file

@ -15,6 +15,7 @@ from app.system.models import (
ConnectionInfo,
LoginInput,
RawDebugLogData,
SystemHealthInfo,
SystemInfo,
)
@ -51,6 +52,9 @@ class NativePythonSystem(SystemBase):
chain=lninfo.chains[0].network,
)
async def get_system_health(self, verbose: bool) -> SystemHealthInfo:
return SystemHealthInfo(healthy=True)
async def shutdown(self, reboot: bool) -> bool:
logging.info("Shutdown / reboot not supported in native_python mode.")
return False