Skip to content

Commit

Permalink
chore(runtime): Add logging for /server_info endpoint (#5208)
Browse files Browse the repository at this point in the history
Co-authored-by: openhands <openhands@all-hands.dev>
  • Loading branch information
xingyaoww and openhands-agent authored Nov 22, 2024
1 parent becb17f commit 1021e0c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion openhands/runtime/action_execution_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,11 +422,13 @@ async def get_server_info():
uptime = current_time - client.start_time
idle_time = current_time - client.last_execution_time

return {
response = {
'uptime': uptime,
'idle_time': idle_time,
'resources': get_system_stats(),
}
logger.info('Server info endpoint response: %s', response)
return response

@app.post('/execute_action')
async def execute_action(action_request: ActionRequest):
Expand Down

0 comments on commit 1021e0c

Please sign in to comment.