diff --git a/app/controller/AlgorithmController.py b/app/controller/AlgorithmController.py index 34ebe9b..ea4fd51 100644 --- a/app/controller/AlgorithmController.py +++ b/app/controller/AlgorithmController.py @@ -47,8 +47,9 @@ def start_train_algorithm(): def wrapped_function(): param = request.args.get('param') id = request.args.get('id') - t = Thread(target=func, args=(param, id)) - #t = Process(target=func, args=(param, id), name=id) + dict = manager.active_connections_dist + # t = Thread(target=func, args=(param, id)) + t = Process(target=func, args=(param, id, dict[id]), name=id) set_value(key=id, value=False) t.start() return output_wrapped(0, 'success', '成功') @@ -302,6 +303,7 @@ def error_return(id: str, data): # 启动训练 @start_train_algorithm() def train_R0DY(params_str, id, getsomething): + manager.active_connections_dist[id] = getsomething print('**********************************') print(params_str) print('**********************************')