Put the resource back in the pool.
(self, exc_type, exc_value, exc_traceback)
| 253 | return self.queue[self._index].client_args |
| 254 | |
| 255 | def __exit__(self, exc_type, exc_value, exc_traceback) -> bool: |
| 256 | """Put the resource back in the pool.""" |
| 257 | |
| 258 | if exc_value is not None: |
| 259 | if ( |
| 260 | exc_type is RateLimitError |
| 261 | and exc_value.status_code == 429 |
| 262 | and judge_quota_exceeded(exc_value.message) |
| 263 | ): |
| 264 | self._remove_cur_arg() |
| 265 | return False |
| 266 | return True |
| 267 | |
| 268 | |
| 269 | # class SpinPool(metaclass=Singleton): |
nothing calls this directly
no test coverage detected