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)
| 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. |
no outgoing calls
no test coverage detected