diff --git a/main.py b/main.py index 075a2ca..c1947e9 100644 --- a/main.py +++ b/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/")