websocket
This commit is contained in:
parent
00dc9b02eb
commit
c21f7a8d38
@ -47,8 +47,9 @@ def start_train_algorithm():
|
|||||||
def wrapped_function():
|
def wrapped_function():
|
||||||
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))
|
dict = manager.active_connections_dist
|
||||||
#t = Process(target=func, args=(param, id), name=id)
|
# t = Thread(target=func, args=(param, id))
|
||||||
|
t = Process(target=func, args=(param, id, dict[id]), name=id)
|
||||||
set_value(key=id, value=False)
|
set_value(key=id, value=False)
|
||||||
t.start()
|
t.start()
|
||||||
return output_wrapped(0, 'success', '成功')
|
return output_wrapped(0, 'success', '成功')
|
||||||
@ -302,6 +303,7 @@ def error_return(id: str, data):
|
|||||||
# 启动训练
|
# 启动训练
|
||||||
@start_train_algorithm()
|
@start_train_algorithm()
|
||||||
def train_R0DY(params_str, id, getsomething):
|
def train_R0DY(params_str, id, getsomething):
|
||||||
|
manager.active_connections_dist[id] = getsomething
|
||||||
print('**********************************')
|
print('**********************************')
|
||||||
print(params_str)
|
print(params_str)
|
||||||
print('**********************************')
|
print('**********************************')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user