MCPcopy Create free account
hub / github.com/TechifyBots/File-Stream-Bot / root_route_handler

Function root_route_handler

biisal/server/stream_routes.py:26–41  ·  view source on GitHub ↗
(_)

Source from the content-addressed store, hash-verified

24
25@routes.get("/", allow_head=True)
26async def root_route_handler(_):
27 return web.json_response(
28 {
29 "server_status": "running",
30 "uptime": get_readable_time(time.time() - StartTime),
31 "telegram_bot": "@" + StreamBot.username,
32 "connected_bots": len(multi_clients),
33 "loads": dict(
34 ("bot" + str(c + 1), l)
35 for c, (_, l) in enumerate(
36 sorted(work_loads.items(), key=lambda x: x[1], reverse=True)
37 )
38 ),
39 "version": __version__,
40 }
41 )
42
43
44@routes.get(r"/watch/{path:\S+}", allow_head=True)

Callers

nothing calls this directly

Calls 1

get_readable_timeFunction · 0.50

Tested by

no test coverage detected