From b6393491e384de62f93ba15f8c4b6491f07c8938 Mon Sep 17 00:00:00 2001 From: wudong Date: Fri, 25 Nov 2022 17:37:28 +0800 Subject: [PATCH] websocket --- app/controller/AlgorithmController.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controller/AlgorithmController.py b/app/controller/AlgorithmController.py index d1b4eff..9567447 100644 --- a/app/controller/AlgorithmController.py +++ b/app/controller/AlgorithmController.py @@ -11,7 +11,7 @@ import json from functools import wraps from threading import Thread from multiprocessing import Process - +from time import sleep from flask import Blueprint, request @@ -47,6 +47,7 @@ def start_train_algorithm(): def wrapped_function(): param = request.args.get('param') id = request.args.get('id') + sleep(10) dict = manager.active_connections_dist # t = Thread(target=func, args=(param, id)) t = Process(target=func, args=(param, id, dict[id]), name=id)