open debug log
This commit is contained in:
parent
4494b54c15
commit
833cb1a24a
@ -80,16 +80,16 @@ class XiaoMusic:
|
|||||||
async with ClientSession() as session:
|
async with ClientSession() as session:
|
||||||
session._cookie_jar = self.cookie_jar
|
session._cookie_jar = self.cookie_jar
|
||||||
while True:
|
while True:
|
||||||
# self.log.debug(
|
self.log.debug(
|
||||||
# "Listening new message, timestamp: %s", self.last_timestamp
|
"Listening new message, timestamp: %s", self.last_timestamp
|
||||||
# )
|
)
|
||||||
await self.get_latest_ask_from_xiaoai(session)
|
await self.get_latest_ask_from_xiaoai(session)
|
||||||
start = time.perf_counter()
|
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()
|
await self.polling_event.wait()
|
||||||
if (d := time.perf_counter() - start) < 1:
|
if (d := time.perf_counter() - start) < 1:
|
||||||
# sleep to avoid too many request
|
# 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)
|
await asyncio.sleep(1 - d)
|
||||||
|
|
||||||
async def init_all_data(self, session):
|
async def init_all_data(self, session):
|
||||||
|
Loading…
Reference in New Issue
Block a user