This commit is contained in:
DingZQ
2025-01-30 23:08:18 +08:00

View File

@@ -174,9 +174,6 @@ async def fastapi_dump_inp(network: str, inp: str) -> bool:
# 必须用这个PlainTextResponse不然每个key都有引号
@app.get("/runproject/", response_class = PlainTextResponse)
async def fastapi_run_project(network: str) -> str:
# 初始化 Redis 连接
# 用redis 来限制并发访问
redis_client = redis.Redis(host="localhost", port=6379, db=0)
lock_key = "exclusive_api_lock"
timeout = 120 # 锁自动过期时间(秒)