mirror of
https://git.datalinker.icu/ltdrdata/ComfyUI-Manager
synced 2025-12-13 16:14:26 +08:00
refactor
This commit is contained in:
parent
15e3699535
commit
ce3b2bab39
@ -981,12 +981,12 @@ async def task_worker():
|
|||||||
timeout = 4096
|
timeout = 4096
|
||||||
task = task_queue.get(timeout)
|
task = task_queue.get(timeout)
|
||||||
if task is None:
|
if task is None:
|
||||||
# Check if queue is truly empty (no pending or running tasks)
|
is_empty_queue = task_queue.total_count() == 0 and len(task_queue.running_tasks) == 0
|
||||||
if task_queue.total_count() == 0 and len(task_queue.running_tasks) == 0:
|
if is_empty_queue:
|
||||||
logging.debug("[ComfyUI-Manager] Queue empty - all tasks completed")
|
logging.debug("[ComfyUI-Manager] Queue empty - all tasks completed")
|
||||||
|
|
||||||
# Trigger batch history serialization if there are completed tasks
|
did_complete_tasks = task_queue.done_count() > 0
|
||||||
if task_queue.done_count() > 0:
|
if did_complete_tasks:
|
||||||
logging.debug("[ComfyUI-Manager] Finalizing batch history with %d completed tasks", task_queue.done_count())
|
logging.debug("[ComfyUI-Manager] Finalizing batch history with %d completed tasks", task_queue.done_count())
|
||||||
task_queue.finalize()
|
task_queue.finalize()
|
||||||
logging.debug("[ComfyUI-Manager] Batch finalization complete")
|
logging.debug("[ComfyUI-Manager] Batch finalization complete")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user