Skip to content
Snippets Groups Projects
Commit effaf3d6 authored by wactbprot's avatar wactbprot
Browse files

parallel/sequential read out

parent e1d84a1d
No related branches found
No related tags found
No related merge requests found
......@@ -384,14 +384,16 @@ def offset_sequences():
# start sequence here (via thread)
# if the lines should run in parallel
if runmod == "sequential":
if run_mod == "sequential":
work_seqence(sequence, line)
else:
start_new_thread( work_seqence, (sequence, line,))
if run_mod == "sequential":
res = {'ok':True}
else:
res = wait_sequences_complete(seq_array)
return jsonify(res)
@app.route('/offset', methods=['POST'])
......@@ -400,6 +402,7 @@ def offset():
s.log.info(msg)
s.r.publish('info', msg)
s.aset('info', 0, msg)
run_mod = s.aget("runmod", 0)
res = {"ok":True}
req = request.get_json()
......@@ -439,7 +442,7 @@ def offset():
if len(offset_sequence) >0:
if runmod == "sequential":
if run_mod == "sequential":
work_seqence(offset_sequence, line)
else:
start_new_thread( work_seqence, (offset_sequence, line,))
......@@ -447,6 +450,9 @@ def offset():
s.log.info("No task match for line {}".format(line))
s.log.info("nothing started")
if run_mod == "sequential":
res = {'ok':True}
else:
res = wait_sequences_complete(seq_array)
else:
msg = "wrong target unit"
......@@ -466,7 +472,7 @@ def ind():
s.log.info(msg)
s.r.publish('info', msg)
s.aset('info', 0, msg)
run_mod = s.aget("runmod", 0)
res = {"ok":True}
req = request.get_json()
......@@ -503,9 +509,8 @@ def ind():
seq_array.append("{}-{}".format(ind_task.get('TaskName'), line))
ind_sequence.append(ind_task)
if len(ind_sequence) >0:
if runmod == "sequential":
if run_mod == "sequential":
work_seqence(ind_sequence, line)
else:
start_new_thread( work_seqence, (ind_sequence, line,))
......@@ -513,6 +518,9 @@ def ind():
s.log.info("No task match for line {}".format(line))
s.log.info("nothing started")
if run_mod == "sequential":
res = {'ok':True}
else:
res = wait_sequences_complete(seq_array)
else:
msg = "wrong target unit"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment