This commit is contained in:
Tim
2024-04-03 14:55:17 -04:00
parent 4f676f7153
commit 3685930d55

View File

@@ -230,7 +230,7 @@ class BlockStateRunner(BlockProgressor):
if isinstance(e, Exception):
log.exception(f'Reverting {fork.branch} due to exception')
else:
log.info(f'Reverting {fork.branch} due to {e}')
log.info(f'Reverting {fork.branch} due to {e}') # runtime exception like SystemExit
self.state.remove_branch(fork.branch)
except Exception:
log.exception('Unhandled exception in runner worker')
@@ -240,7 +240,6 @@ class BlockStateRunner(BlockProgressor):
async def process(self, fork: Fork):
log.debug(f'processing {fork}')
chain = current_chain.get()
w3 = current_w3.get()
current_blockstate.set(self.state)
@@ -285,7 +284,7 @@ class BlockStateRunner(BlockProgressor):
current_pub.set(lambda room, evnt, *args: pubs.append((room, evnt, args))) # used by handle_vault_created
if not self.state_initialized:
await self.do_state_init_cbs()
log.debug(f'invoking callbacks with fork {current_fork.get()}')
# log.debug(f'invoking callbacks with fork {current_fork.get()}')
await self.invoke_callbacks(batches)
# todo
@@ -310,7 +309,7 @@ class BlockStateRunner(BlockProgressor):
# todo try/except for known retryable errors
# noinspection PyCallingNonCallable
await maywait(callback(promotion_fork, diff_items))
except Exception: # legitimately catch EVERYTHING because we re-raise
except Exception: # legitimately catch EVERYTHING because we re-raise. worker() does the catching.
log.debug('rolling back session')
if session is not None:
session.rollback()