[Optim] Optimize costtime in checking tasks in engine-worker-queue (#5580)

* [Optim] Optimize costtime in checking tasks in engine-worker-queue

* Update fastdeploy/engine/common_engine.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Jiang-Jia-Jun <jiangjiajun@baidu.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Jiang-Jia-Jun
2025-12-16 19:27:31 +08:00
committed by GitHub
parent 55609a51fc
commit 2ad3bff4ff

View File

@@ -945,7 +945,7 @@ class EngineService:
while self.running:
try:
if self.engine_worker_queue.num_tasks() > 0:
if self.engine_worker_queue.exist_tasks():
time.sleep(0.001)
continue
if self.cfg.scheduler_config.splitwise_role != "mixed":