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