Skip to content

Commit ce3b2ba

Browse files
refactor
1 parent 15e3699 commit ce3b2ba

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

comfyui_manager/glob/manager_server.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -981,12 +981,12 @@ async def do_install_model(params: ModelMetadata) -> str:
981981
timeout = 4096
982982
task = task_queue.get(timeout)
983983
if task is None:
984-
# Check if queue is truly empty (no pending or running tasks)
985-
if task_queue.total_count() == 0 and len(task_queue.running_tasks) == 0:
984+
is_empty_queue = task_queue.total_count() == 0 and len(task_queue.running_tasks) == 0
985+
if is_empty_queue:
986986
logging.debug("[ComfyUI-Manager] Queue empty - all tasks completed")
987987

988-
# Trigger batch history serialization if there are completed tasks
989-
if task_queue.done_count() > 0:
988+
did_complete_tasks = task_queue.done_count() > 0
989+
if did_complete_tasks:
990990
logging.debug("[ComfyUI-Manager] Finalizing batch history with %d completed tasks", task_queue.done_count())
991991
task_queue.finalize()
992992
logging.debug("[ComfyUI-Manager] Batch finalization complete")

0 commit comments

Comments
 (0)