MCPcopy
hub / github.com/Comfy-Org/ComfyUI-Manager / total_count

Method total_count

comfyui_manager/glob/manager_server.py:458–469  ·  view source on GitHub ↗

Get the total number of tasks currently in the system (pending + running). Returns: int: Combined count of pending and running tasks. Returns 0 if either collection is None (defensive programming).

(self)

Source from the content-addressed store, hash-verified

456 return len(self.history_tasks) if self.history_tasks is not None else 0
457
458 def total_count(self) -> int:
459 """Get the total number of tasks currently in the system (pending + running).
460
461 Returns:
462 int: Combined count of pending and running tasks.
463 Returns 0 if either collection is None (defensive programming).
464 """
465 return (
466 len(self.pending_tasks) + len(self.running_tasks)
467 if self.pending_tasks is not None and self.running_tasks is not None
468 else 0
469 )
470
471 def finalize(self) -> None:
472 """Finalize a completed task batch by saving execution history to disk.

Callers 2

task_workerFunction · 0.45
queue_countFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected