(self, timeout: Optional[float] = None)
| 238 | logger.info(f"Task {task_id} acquired processing lock") |
| 239 | return acquired |
| 240 | |
| 241 | def release_processing_lock(self, task_id: str): |
| 242 | with self._lock: |
| 243 | if self._current_processing_task == task_id: |
| 244 | self._current_processing_task = None |
| 245 | try: |
| 246 | self._processing_lock.release() |
| 247 | logger.info(f"Task {task_id} released processing lock") |
| 248 | except RuntimeError as e: |
| 249 | logger.warning(f"Task {task_id} tried to release lock but failed: {e}") |
no test coverage detected