This commit is contained in:
tim
2025-03-19 17:31:34 -04:00
parent 4492d23c47
commit a06eeeb10d
2 changed files with 5 additions and 1 deletions

View File

@@ -190,6 +190,7 @@ async def main():
while True:
wake_up = now() + delay
# log.debug(f'querying {pool}')
tx = None
try:
price = await get_pool_price(pool)
if price != last_prices.get(pool):
@@ -201,6 +202,9 @@ async def main():
log.debug(f'Mirrored {addr} {price}')
except Exception as x:
log.debug(f'Could not update {pool}: {x}')
if tx is not None:
tx.account.reset_nonce()
tx.account.release()
continue
try:
pool = next(pool_iter)

View File

@@ -614,11 +614,11 @@ class TrancheTrigger:
self.order_trigger.expire_tranche(self.tk.tranche_index)
def expire(self):
self.disable()
if self.closed:
return
order_log.debug(f'tranche expired {self.tk}')
self.status = TrancheState.Expired
self.disable()
def kill(self):
order_log.warning(f'tranche KILLED {self.tk}')