Skip to content

Commit

Permalink
Don't try to catch errors when running in serial.
Browse files Browse the repository at this point in the history
Throwing the errors makes debugging easier
  • Loading branch information
pattonw committed Aug 24, 2024
1 parent cea0b86 commit 2fb2c24
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions daisy/serial_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,12 @@ def run_blockwise(self, tasks, scheduler=None):
self.notify_acquire_block(
block.task_id, scheduler.task_states[block.task_id]
)
try:
process_funcs[block.task_id](block)
block.status = BlockStatus.SUCCESS
except Exception as e:
if isinstance(e, KeyboardInterrupt):
raise e
logger.error(f"Error processing block {block.block_id}: {e}")
block.status = BlockStatus.FAILED
self.notify_block_failure(block, e, {"worker_id": "serial"})
finally:
scheduler.release_block(block)
self.notify_release_block(
block.task_id, scheduler.task_states[block.task_id]
)
process_funcs[block.task_id](block)
block.status = BlockStatus.SUCCESS
scheduler.release_block(block)
self.notify_release_block(
block.task_id, scheduler.task_states[block.task_id]
)

if scheduler.task_states[block.task_id].is_done():
self.notify_task_done(
Expand Down

0 comments on commit 2fb2c24

Please sign in to comment.