add status for ton_daemon

This commit is contained in:
user committed 2025-03-13 20:14:40 +03:00
1 parent b63f663bd2
commit 54bc545090
2 files changed
+4 -1

No files matched your search

+1 -1
View File
@@ -54,7 +54,7 @@ async def s_api_v1_node_friendly(request):
for service_key, service in request.app.ctx.memory.known_states.items():
response_plain_text += f"""
{service_key}:
status: {service['status'] if (service['timestamp'] and (datetime.now() - service['timestamp']).total_seconds() < 30) else 'not working: timeout'}
status: {service['status'] if (service['timestamp'] and (datetime.now() - service['timestamp']).total_seconds() < 120) else 'not working: timeout'}
delay: {round((datetime.now() - service['timestamp']).total_seconds(), 3) if service['timestamp'] else -1}
"""
return response.text(response_plain_text, content_type='text/plain')