Refine
This commit is contained in:
2
main.py
2
main.py
@@ -151,7 +151,7 @@ async def fastapi_dump_inp(network: str, inp: str) -> bool:
|
|||||||
# 必须用这个PlainTextResponse,不然每个key都有引号
|
# 必须用这个PlainTextResponse,不然每个key都有引号
|
||||||
@app.get("/runproject/", response_class = PlainTextResponse)
|
@app.get("/runproject/", response_class = PlainTextResponse)
|
||||||
def fastapi_run_project(network: str) -> str:
|
def fastapi_run_project(network: str) -> str:
|
||||||
|
global lock_simulation
|
||||||
if lock_simulation:
|
if lock_simulation:
|
||||||
raise HTTPException(status_code=409, detail="is in simulation")
|
raise HTTPException(status_code=409, detail="is in simulation")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user