This commit is contained in:
wudong 2022-11-18 17:31:11 +08:00
commit 04249ddf0f

View File

@ -18,6 +18,7 @@ from app.utils.RedisMQTool import Task
from app.utils.StandardizedOutput import output_wrapped from app.utils.StandardizedOutput import output_wrapped
from app.utils.redis_config import redis_client from app.utils.redis_config import redis_client
from app.utils.websocket_tool import manager from app.utils.websocket_tool import manager
from app.configs.global_var import set_value
import sys import sys
from pathlib import Path from pathlib import Path
@ -45,6 +46,7 @@ def start_train_algorithm():
param = request.args.get('param') param = request.args.get('param')
id = request.args.get('id') id = request.args.get('id')
t = Thread(target=func, args=(param, id)) t = Thread(target=func, args=(param, id))
set_value(key=id, value=True)
t.start() t.start()
return output_wrapped(0, 'success', '成功') return output_wrapped(0, 'success', '成功')