Skip to content

Commit a5dcdea

Browse files
author
wangzaijun
committed
fix log
1 parent 3737978 commit a5dcdea

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

lightllm/server/httpserver/manager.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -429,14 +429,12 @@ async def timer_to_pd_master(self):
429429
logger.info(f"Sent heartbeat: {heartbeat_message}")
430430
log_count += 1
431431
await asyncio.sleep(3)
432-
logger.info(f"mean first cost: {self.first_time_costs.average()} ms")
432+
if log_count % 5 == 0:
433+
logger.info(f"mean first cost: {self.first_time_costs.average()} ms")
433434

434435
except Exception as e:
435436
logger.error("connetion to pd_master has error")
436-
import random
437-
438-
if random.randint(0, 10) <= 1:
439-
logger.exception(str(e))
437+
logger.exception(str(e))
440438
await asyncio.sleep(10)
441439
logger.info("reconnection to pd_master")
442440

lightllm/server/httpserver_for_pd_master/manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ async def remove_req(self, group_request_id):
306306
async def handle_loop(self):
307307
while True:
308308
# 可以做一个定时任务
309-
await asyncio.sleep(10)
309+
await asyncio.sleep(20)
310310
logger.info(f"mean first cost: {self.first_time_costs.average()} ms")
311311
logger.info(f"create_session_costs: {self.create_session_costs.average()} ms")
312312
return

0 commit comments

Comments
 (0)