From 5f41d8100d3a8a59700de55e86f7d82b631dd85b Mon Sep 17 00:00:00 2001 From: wataru Date: Wed, 19 Apr 2023 08:22:08 +0900 Subject: [PATCH] bugfix: delete colab --- server/MMVCServerSIO.py | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/server/MMVCServerSIO.py b/server/MMVCServerSIO.py index e95b4cc7..203ed3fb 100755 --- a/server/MMVCServerSIO.py +++ b/server/MMVCServerSIO.py @@ -185,28 +185,19 @@ if __name__ == '__main__': # log_level="warning" ) else: - # HTTP サーバ起動 - if args.colab == True: - uvicorn.run( - f"{os.path.basename(__file__)[:-3]}:app_fastapi", - host="0.0.0.0", - port=int(PORT), - log_level="warning" - ) - else: - p = mp.Process(name="p", target=localServer) - p.start() - try: - if sys.platform.startswith('win'): - process = subprocess.Popen([NATIVE_CLIENT_FILE_WIN, "-u", f"http://localhost:{PORT}/{path}"]) - return_code = process.wait() - print("client closed.") - p.terminate() - elif sys.platform.startswith('darwin'): - process = subprocess.Popen([NATIVE_CLIENT_FILE_MAC, "-u", f"http://localhost:{PORT}/{path}"]) - return_code = process.wait() - print("client closed.") - p.terminate() + p = mp.Process(name="p", target=localServer) + p.start() + try: + if sys.platform.startswith('win'): + process = subprocess.Popen([NATIVE_CLIENT_FILE_WIN, "-u", f"http://localhost:{PORT}/{path}"]) + return_code = process.wait() + print("client closed.") + p.terminate() + elif sys.platform.startswith('darwin'): + process = subprocess.Popen([NATIVE_CLIENT_FILE_MAC, "-u", f"http://localhost:{PORT}/{path}"]) + return_code = process.wait() + print("client closed.") + p.terminate() - except Exception as e: - print(e) + except Exception as e: + print(e)