MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / record_success

Method record_success

src/services/token_manager.py:977–983  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 1

handle_generationMethod · 0.80

Calls 1

reset_error_countMethod · 0.80

Tested by

no test coverage detected