mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-21 22:27:13 +08:00
fix: add debug log
This commit is contained in:
@@ -199,6 +199,8 @@ class MJBot:
|
|||||||
return reply
|
return reply
|
||||||
|
|
||||||
async def check_task(self, task: MJTask, e_context: EventContext):
|
async def check_task(self, task: MJTask, e_context: EventContext):
|
||||||
|
try:
|
||||||
|
logger.debug(f"[MJ] start check task status, {task}")
|
||||||
max_retry_times = 90
|
max_retry_times = 90
|
||||||
while max_retry_times > 0:
|
while max_retry_times > 0:
|
||||||
await asyncio.sleep(10)
|
await asyncio.sleep(10)
|
||||||
@@ -227,6 +229,8 @@ class MJBot:
|
|||||||
logger.warn("[MJ] end from poll")
|
logger.warn("[MJ] end from poll")
|
||||||
if self.tasks.get(task.id):
|
if self.tasks.get(task.id):
|
||||||
self.tasks[task.id].status = Status.EXPIRED
|
self.tasks[task.id].status = Status.EXPIRED
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(e)
|
||||||
|
|
||||||
def _process_success_task(self, task: MJTask, res: dict, e_context: EventContext):
|
def _process_success_task(self, task: MJTask, res: dict, e_context: EventContext):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user