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

Function auto_unban_task

src/main.py:189–196  ·  view source on GitHub ↗

定时任务:每小时检查并解禁429被禁用的token

()

Source from the content-addressed store, hash-verified

187 # Start 429 auto-unban task
188 import asyncio
189 async def auto_unban_task():
190 """定时任务:每小时检查并解禁429被禁用的token"""
191 while True:
192 try:
193 await asyncio.sleep(3600) # 每小时执行一次
194 await token_manager.auto_unban_429_tokens()
195 except Exception as e:
196 print(f"Auto-unban task error: {e}")
197
198 auto_unban_task_handle = asyncio.create_task(auto_unban_task())
199 token_manager.start_protocol_refresher()

Callers 1

lifespanFunction · 0.85

Calls 2

sleepMethod · 0.80
auto_unban_429_tokensMethod · 0.80

Tested by

no test coverage detected