Skip to content

Commit 9f19b4d

Browse files
author
Michael McCrackan
committed
extra fixes
1 parent a077d98 commit 9f19b4d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

sotodlib/preprocess/preprocess_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def get_groups(obs_id, configs, context):
184184

185185
if (gb == 'detset') and (len(group_by) == 1):
186186
groups = context.obsfiledb.get_detsets(obs_id)
187-
return group_by, [[g] for g in groups]
187+
return group_by, [[g] for g in groups], None
188188

189189
det_info = context.get_det_info(obs_id)
190190
rs = det_info.subset(keys=group_by).distinct()

sotodlib/site_pipeline/preprocess_tod.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ def preprocess_tod(obs_id,
8686
group_by, groups, error = pp_util.get_groups(obs_id, configs, context)
8787

8888
if error is not None:
89-
return error[0], [None, None]
89+
if run_parallel:
90+
return error[0], [None, None]
91+
else:
92+
return
9093

9194
all_groups = groups.copy()
9295
for g in all_groups:
@@ -330,7 +333,6 @@ def main(
330333

331334
# clean up lingering files from previous incomplete runs
332335
policy_dir = os.path.dirname(configs['archive']['policy']['filename']) + '/temp/'
333-
print(policy_dir)
334336
for obs in obs_list:
335337
obs_id = obs['obs_id']
336338
found = False
@@ -361,7 +363,6 @@ def main(
361363
run_list.append( (obs, None) )
362364
else:
363365
group_by, groups, _ = pp_util.get_groups(obs["obs_id"], configs, context)
364-
365366
if len(x) != len(groups):
366367
[groups.remove([a[f'dets:{gb}'] for gb in group_by]) for a in x]
367368
run_list.append( (obs, groups) )
@@ -403,7 +404,7 @@ def main(
403404
continue
404405
futures.remove(future)
405406

406-
if db_datasets:
407+
if err is None and db_datasets:
407408
logger.info(f'Processing future result db_dataset: {db_datasets}')
408409
for db_dataset in db_datasets:
409410
pp_util.cleanup_mandb(err, db_dataset, configs, logger)

0 commit comments

Comments
 (0)