This commit is contained in:
DingZQ
2023-10-21 00:12:19 +08:00
parent 86242b13d2
commit 890f8d9cf6

View File

@@ -150,6 +150,7 @@ 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:
global lock
if lock.locked():
raise HTTPException(status_code=400, detail="is in simulation")
else: