From 833cb1a24a00493afbecae371aa47fd80fe861e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B6=B5=E6=9B=A6?= Date: Sun, 4 Feb 2024 14:04:18 +0800 Subject: [PATCH] open debug log --- xiaomusic/xiaomusic.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xiaomusic/xiaomusic.py b/xiaomusic/xiaomusic.py index 8edb33f..993ee13 100644 --- a/xiaomusic/xiaomusic.py +++ b/xiaomusic/xiaomusic.py @@ -80,16 +80,16 @@ class XiaoMusic: async with ClientSession() as session: session._cookie_jar = self.cookie_jar while True: - # self.log.debug( - # "Listening new message, timestamp: %s", self.last_timestamp - # ) + self.log.debug( + "Listening new message, timestamp: %s", self.last_timestamp + ) await self.get_latest_ask_from_xiaoai(session) start = time.perf_counter() - # self.log.debug("Polling_event, timestamp: %s", self.last_timestamp) + self.log.debug("Polling_event, timestamp: %s", self.last_timestamp) await self.polling_event.wait() if (d := time.perf_counter() - start) < 1: # sleep to avoid too many request - # self.log.debug("Sleep %f, timestamp: %s", d, self.last_timestamp) + self.log.debug("Sleep %f, timestamp: %s", d, self.last_timestamp) await asyncio.sleep(1 - d) async def init_all_data(self, session):