minor touchups
This commit is contained in:
@@ -107,7 +107,7 @@ async def handle_order_placed(event: EventData):
|
||||
try:
|
||||
vault_owners[addr] = await VaultContract(addr).owner()
|
||||
except Exception:
|
||||
log.warning(f'vault owner for {addr} could not be found.')
|
||||
log.warning(f'vault owner for {addr} could not be found.', exc_info=True)
|
||||
return
|
||||
vault = VaultContract(addr)
|
||||
for index in range(start_index, start_index+num_orders):
|
||||
@@ -239,13 +239,13 @@ def handle_vault_created(created: EventData):
|
||||
|
||||
async def activate_time_triggers():
|
||||
now = current_clock.get().now()
|
||||
log.debug(f'activating time triggers at {now}')
|
||||
# log.debug(f'activating time triggers at {now}')
|
||||
# time triggers
|
||||
for tt in tuple(time_triggers):
|
||||
await maywait(tt(now))
|
||||
|
||||
async def activate_price_triggers():
|
||||
log.debug(f'activating price triggers')
|
||||
# log.debug(f'activating price triggers')
|
||||
pools_triggered = set()
|
||||
for pool, price in new_pool_prices.items():
|
||||
pools_triggered.add(pool)
|
||||
|
||||
@@ -186,15 +186,12 @@ class BlockStateRunner:
|
||||
async with asyncio.timeout(1): # check running flag every second
|
||||
head = await self.queue.get()
|
||||
except TimeoutError:
|
||||
log.debug('timeout in runner')
|
||||
# 1 second has passed without a new head. Run the postprocess callbacks to check for activated time-based triggers
|
||||
if prev_head is not None:
|
||||
await self.handle_time_tick(head)
|
||||
else:
|
||||
try:
|
||||
log.debug('handle head...')
|
||||
await self.handle_head(chain, head, w3)
|
||||
log.debug('handled')
|
||||
prev_head = head
|
||||
except Exception as x:
|
||||
log.exception(x)
|
||||
|
||||
Reference in New Issue
Block a user