Refine
This commit is contained in:
11
main.py
11
main.py
@@ -148,17 +148,12 @@ isSimulaion = False
|
||||
# 必须用这个PlainTextResponse,不然每个key都有引号
|
||||
@app.get("/runproject/", response_class = PlainTextResponse)
|
||||
async def fastapi_run_project(network: str) -> str:
|
||||
for i in range(10000):
|
||||
if isSimulaion == False:
|
||||
break
|
||||
time.sleep(5)
|
||||
|
||||
result = {}
|
||||
if isSimulaion == False:
|
||||
result = run_project(network)
|
||||
isSimulaion = False
|
||||
|
||||
return result
|
||||
return result
|
||||
else:
|
||||
return "正在进行其他计算任务"
|
||||
|
||||
# put in inp folder, name without extension
|
||||
@app.get("/runinp/")
|
||||
|
||||
Reference in New Issue
Block a user