This commit is contained in:
Windpicker-owo
2025-12-08 17:19:33 +08:00
136 changed files with 2188 additions and 2230 deletions

View File

@@ -615,7 +615,7 @@ class UnifiedScheduler:
async def _execute_task(self, task: ScheduleTask) -> None:
"""执行单个任务(完全隔离)"""
execution = task.start_execution()
task.start_execution()
self._deadlock_detector.register_task(task.schedule_id, task.task_name)
try:
@@ -755,7 +755,7 @@ class UnifiedScheduler:
async def _execute_event_task(self, task: ScheduleTask, event_params: dict[str, Any]) -> None:
"""执行事件触发的任务"""
execution = task.start_execution()
task.start_execution()
self._deadlock_detector.register_task(task.schedule_id, task.task_name)
try:
@@ -859,7 +859,7 @@ class UnifiedScheduler:
for i, timeout in enumerate(timeouts):
try:
# 使用 asyncio.wait 代替 wait_for避免重新抛出异常
done, pending = await asyncio.wait({task._asyncio_task}, timeout=timeout)
done, _pending = await asyncio.wait({task._asyncio_task}, timeout=timeout)
if done:
# 任务已完成(可能是正常完成或被取消)