Refine
This commit is contained in:
3
main.py
3
main.py
@@ -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 # 锁自动过期时间(秒)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user