Skip to content

Commit

Permalink
feat: ✨ Add safe failing for segment blockwise
Browse files Browse the repository at this point in the history
  • Loading branch information
rhoadesScholar committed Apr 17, 2024
1 parent 049e448 commit e41a9a3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion dacapo/blockwise/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,5 +197,10 @@ def segment_blockwise(

success = success and daisy.run_blockwise([task])

shutil.rmtree(tmpdir, ignore_errors=True)
if success:
shutil.rmtree(tmpdir, ignore_errors=True)
else:
raise RuntimeError(
f"Blockwise segmentation failed. Can rerun with merge files stored at:\n\t{tmpdir}"
)
return success

0 comments on commit e41a9a3

Please sign in to comment.