Tim O'Farrell e045b757fa
Moved monitoring of last_execution_time to system_stats (#9851)
Co-authored-by: openhands <openhands@all-hands.dev>
2025-07-22 11:32:59 -06:00

18 lines
386 B
Python

from fastapi import FastAPI
from openhands.runtime.utils.system_stats import get_system_info
def add_health_endpoints(app: FastAPI):
@app.get('/alive')
async def alive():
return {'status': 'ok'}
@app.get('/health')
async def health() -> str:
return 'OK'
@app.get('/server_info')
async def get_server_info():
return get_system_info()