(self, task_id: str)
| 224 | |
| 225 | def get_pending_task_count(self) -> int: |
| 226 | with self._lock: |
| 227 | return sum(1 for t in self._tasks.values() if t.status == TaskStatus.PENDING) |
| 228 | |
| 229 | def is_processing(self) -> bool: |
| 230 | with self._lock: |
| 231 | return self._current_processing_task is not None |
| 232 | |
| 233 | def acquire_processing_lock(self, task_id: str, timeout: Optional[float] = None) -> bool: |
| 234 | acquired = self._processing_lock.acquire(timeout=timeout if timeout else False) |
| 235 | if acquired: |
| 236 | with self._lock: |
| 237 | self._current_processing_task = task_id |
no test coverage detected