From 653655efc810d24415f96ab044957de7a6af7ca3 Mon Sep 17 00:00:00 2001 From: JIAKUNHAO Date: Fri, 18 Nov 2022 17:35:21 +0800 Subject: [PATCH] global value init --- app/controller/AlgorithmController.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controller/AlgorithmController.py b/app/controller/AlgorithmController.py index 176b297..34a06f9 100644 --- a/app/controller/AlgorithmController.py +++ b/app/controller/AlgorithmController.py @@ -46,7 +46,7 @@ def start_train_algorithm(): param = request.args.get('param') id = request.args.get('id') t = Thread(target=func, args=(param, id)) - set_value(key=id, value=True) + set_value(key=id, value=False) t.start() return output_wrapped(0, 'success', '成功') @@ -260,10 +260,10 @@ def change_ifKillDIct(): """ id = request.args.get('id') type = request.args.get('type') - global ifKillDict - ifKillDict[id] = False + set_value(id, type) return output_wrapped(0, 'success') + # @start_train_algorithm() # def start(param: str): # """