This commit is contained in:
雅诺狐
2025-12-08 15:48:40 +08:00
parent 084192843b
commit 3edcc9d169
137 changed files with 2194 additions and 2237 deletions

View File

@@ -623,7 +623,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:
@@ -763,7 +763,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:
@@ -867,7 +867,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:
# 任务已完成(可能是正常完成或被取消)