DRY
This commit is contained in:
@ -362,13 +362,11 @@ def work(backend_address, accumulator_host, accumulator_port, visualisation_host
|
|||||||
|
|
||||||
accumulator_socket.send_json(results, FLAGS)
|
accumulator_socket.send_json(results, FLAGS)
|
||||||
|
|
||||||
if apply_aggregation and "aggregation_max" in results:
|
|
||||||
if not forceSendVisualisation:
|
send_empty_cond1 = (apply_aggregation and "aggregation_max" in results and not forceSendVisualisation)
|
||||||
data = np.empty((2, 2), dtype=np.uint16)
|
send_empty_cond2 = (not results["is_good_frame"] or not (results["is_hit_frame"] or randint(1, skip_frames_rate) == 1))
|
||||||
results["type"] = str(data.dtype)
|
|
||||||
results["shape"] = data.shape
|
if send_empty_cond1 or send_empty_cond2:
|
||||||
else:
|
|
||||||
if not results["is_good_frame"] or not (results["is_hit_frame"] or randint(1, skip_frames_rate) == 1):
|
|
||||||
data = np.empty((2, 2), dtype=np.uint16)
|
data = np.empty((2, 2), dtype=np.uint16)
|
||||||
results["type"] = str(data.dtype)
|
results["type"] = str(data.dtype)
|
||||||
results["shape"] = data.shape
|
results["shape"] = data.shape
|
||||||
|
Reference in New Issue
Block a user