comment
This commit is contained in:
@@ -230,7 +230,7 @@ class BlockStateRunner(BlockProgressor):
|
|||||||
if isinstance(e, Exception):
|
if isinstance(e, Exception):
|
||||||
log.exception(f'Reverting {fork.branch} due to exception')
|
log.exception(f'Reverting {fork.branch} due to exception')
|
||||||
else:
|
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)
|
self.state.remove_branch(fork.branch)
|
||||||
except Exception:
|
except Exception:
|
||||||
log.exception('Unhandled exception in runner worker')
|
log.exception('Unhandled exception in runner worker')
|
||||||
@@ -240,7 +240,6 @@ class BlockStateRunner(BlockProgressor):
|
|||||||
|
|
||||||
|
|
||||||
async def process(self, fork: Fork):
|
async def process(self, fork: Fork):
|
||||||
log.debug(f'processing {fork}')
|
|
||||||
chain = current_chain.get()
|
chain = current_chain.get()
|
||||||
w3 = current_w3.get()
|
w3 = current_w3.get()
|
||||||
current_blockstate.set(self.state)
|
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
|
current_pub.set(lambda room, evnt, *args: pubs.append((room, evnt, args))) # used by handle_vault_created
|
||||||
if not self.state_initialized:
|
if not self.state_initialized:
|
||||||
await self.do_state_init_cbs()
|
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)
|
await self.invoke_callbacks(batches)
|
||||||
|
|
||||||
# todo
|
# todo
|
||||||
@@ -310,7 +309,7 @@ class BlockStateRunner(BlockProgressor):
|
|||||||
# todo try/except for known retryable errors
|
# todo try/except for known retryable errors
|
||||||
# noinspection PyCallingNonCallable
|
# noinspection PyCallingNonCallable
|
||||||
await maywait(callback(promotion_fork, diff_items))
|
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')
|
log.debug('rolling back session')
|
||||||
if session is not None:
|
if session is not None:
|
||||||
session.rollback()
|
session.rollback()
|
||||||
|
|||||||
Reference in New Issue
Block a user