remove creation of very_first_start.dap
This commit is contained in:
@@ -30,9 +30,8 @@ def accumulate(_accumulator_host, accumulator_port): #TODO: accumulator_host is
|
||||
|
||||
poller.register(accumulator_socket, zmq.POLLIN)
|
||||
|
||||
run_name_before = "very_first_start"
|
||||
fname_output = f"{OUTPUT_DIR_NAME}/{run_name_before}.dap"
|
||||
output_dap = open_new_file(fname_output)
|
||||
run_name_before = None
|
||||
output_dap = None
|
||||
|
||||
n_frames_received = 0
|
||||
|
||||
@@ -40,7 +39,8 @@ def accumulate(_accumulator_host, accumulator_port): #TODO: accumulator_host is
|
||||
events = dict(poller.poll(10)) # check for worker output every 0.01 seconds
|
||||
|
||||
if accumulator_socket not in events:
|
||||
output_dap.flush() # may be too intensive
|
||||
if output_dap:
|
||||
output_dap.flush() # may be too intensive
|
||||
continue
|
||||
|
||||
results = accumulator_socket.recv_json(FLAGS)
|
||||
@@ -52,8 +52,9 @@ def accumulate(_accumulator_host, accumulator_port): #TODO: accumulator_host is
|
||||
|
||||
if run_name != run_name_before:
|
||||
run_name_before = run_name
|
||||
fname_output = f"{OUTPUT_DIR_NAME}/{detector}/{run_name_before}.dap"
|
||||
output_dap.close()
|
||||
fname_output = f"{OUTPUT_DIR_NAME}/{detector}/{run_name}.dap"
|
||||
if output_dap:
|
||||
output_dap.close()
|
||||
output_dap = open_new_file(fname_output)
|
||||
|
||||
res_is_good_frame = results.get("is_good_frame", -1)
|
||||
|
||||
Reference in New Issue
Block a user