Record successful request (reset consecutive error count) This method resets error_count to 0, which is used for auto-disable threshold checking. Note: today_error_count and historical statistics are NOT reset.
(self, token_id: int)
| 975 | await self.disable_token(token_id) |
| 976 | |
| 977 | async def record_success(self, token_id: int): |
| 978 | """Record successful request (reset consecutive error count) |
| 979 | |
| 980 | This method resets error_count to 0, which is used for auto-disable threshold checking. |
| 981 | Note: today_error_count and historical statistics are NOT reset. |
| 982 | """ |
| 983 | await self.db.reset_error_count(token_id) |
| 984 | |
| 985 | async def ban_token_for_429(self, token_id: int): |
| 986 | """因429错误立即禁用token |
no test coverage detected