Enable a token and reset error count
(self, token_id: int)
| 256 | debug_logger.log_warning(f"[DELETE_TOKEN] 清理 personal 浏览器状态失败: {e}") |
| 257 | |
| 258 | async def enable_token(self, token_id: int): |
| 259 | """Enable a token and reset error count""" |
| 260 | # Enable the token |
| 261 | await self.db.update_token(token_id, is_active=True, ban_reason=None, banned_at=None) |
| 262 | # Reset error count when enabling (only reset total error_count, keep today_error_count) |
| 263 | await self.db.reset_error_count(token_id) |
| 264 | |
| 265 | async def disable_token(self, token_id: int): |
| 266 | """Disable a token""" |
no test coverage detected