catch task re-raised exception and continue scan; missed some string+string instead of os.path.join for path handling

This commit is contained in:
2020-05-16 19:46:09 +00:00
parent 01fb498e1d
commit a0118e59bf
2 changed files with 8 additions and 5 deletions
+2 -2
View File
@@ -64,8 +64,8 @@ def take_pedestal(instrument, pgroup, api_address, raw_dir, res_dir, analyze_loc
now = datetime.now().strftime(TIMESTAMP_FORMAT)
file_base = PREFIX + now
raw_file_base = raw_dir + file_base
res_file_base = res_dir + file_base
raw_file_base = os.path.join(raw_dir, file_base)
res_file_base = os.path.join(res_dir, file_base)
period = 1 / freq
trigger = 1
+6 -3
View File
@@ -71,11 +71,11 @@ class ScanBackend:
default_dir = acq.default_dir
if default_dir is None:
continue
data_dir = default_dir + self.data_base_dir
data_dir = os.path.join(default_dir, self.data_base_dir)
if self.make_scan_sub_dir:
filebase = os.path.basename(self.filename)
data_dir += filebase
data_dir = os.path.join(data_dir, filebase)
make_missing_dir(data_dir)
@@ -137,7 +137,10 @@ def set_all_target_values(adjustables, values):
def wait_for_all(tasks):
for t in tasks:
t.wait()
try: # TODO: what do we want to do here? not write the filenames(s?) to scan_info?
t.wait()
except Exception as e:
print(e)