diff --git a/core/tasks/queue.py b/core/tasks/queue.py index added0e..072453d 100644 --- a/core/tasks/queue.py +++ b/core/tasks/queue.py @@ -61,6 +61,12 @@ class ValidationQueue: for i in range(self.worker_count): self._workers.append(asyncio.create_task(self._worker_loop(i))) + + # 唤醒 Worker 处理恢复的 pending 任务 + if pending: + for _ in range(min(pending, self.worker_count)): + self._signal.put_nowait(None) + logger.info(f"ValidationQueue started with {self.worker_count} workers") async def stop(self):