MCPcopy Create free account
hub / github.com/ModelEngine-Group/flexai / handle_server

Function handle_server

GPU-Virtual-Service/gpu-remoting/monitor.py:283–292  ·  view source on GitHub ↗
(conn)

Source from the content-addressed store, hash-verified

281 logging.info(f"Accepted connection from {addr}")
282 while True:
283 data = conn.recv(1024).decode()
284 if not data:
285 break
286 handle_message(conn, data, addr)
287 logging.info(f"Connection from {addr} closed")
288 conn.close()
289
290def schedule_update():
291 update_gpu_info()
292 threading.Timer(240, schedule_update).start() # 600秒 = 10分钟
293
294def main():
295 #一开始先初始化redis里的服务器信息,然后启动TCP连接,监听Server请求

Callers

nothing calls this directly

Calls 2

handle_messageFunction · 0.70
closeMethod · 0.45

Tested by

no test coverage detected