Refine
This commit is contained in:
6
main.py
6
main.py
@@ -33,7 +33,7 @@ if not os.path.exists(tmpDir):
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
isSimulaion = False
|
||||
isSimulation = False
|
||||
|
||||
app.add_middleware(GZipMiddleware, minimum_size=1000)
|
||||
|
||||
@@ -149,9 +149,9 @@ 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:
|
||||
if isSimulaion == False:
|
||||
if isSimulation:
|
||||
result = run_project(network)
|
||||
isSimulaion = False
|
||||
isSimulation = False
|
||||
return result
|
||||
else:
|
||||
return "正在进行其他计算任务"
|
||||
|
||||
Reference in New Issue
Block a user