feat: 添加任务管理模块

This commit is contained in:
Junyan Qin
2024-10-22 18:09:18 +08:00
parent 26770439bb
commit c151665419
10 changed files with 121 additions and 36 deletions
+3 -3
View File
@@ -184,10 +184,10 @@ class PlatformManager:
tasks.append(exception_wrapper(adapter))
for task in tasks:
async_task = asyncio.create_task(task)
self.ap.asyncio_tasks.append(async_task)
# async_task = asyncio.create_task(task)
# self.ap.asyncio_tasks.append(async_task)
self.ap.task_mgr.create_task(task)
except Exception as e:
self.ap.logger.error('平台适配器运行出错: ' + str(e))
self.ap.logger.debug(f"Traceback: {traceback.format_exc()}")