Skip to content

Commit

Permalink
Add logging in poll_exits (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeny-stakewise authored Nov 25, 2024
1 parent 1c0880f commit f58f59d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/validators/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,11 @@ async def poll_exits(session: aiohttp.ClientSession) -> list[dict]:
"""
while True:
try:
if exits := await relayer.get_exits(session):
exits = await relayer.get_exits(session)
logger.info('Got %d validator exits from relayer', len(exits))
if exits:
return exits
except (ClientError, asyncio.TimeoutError) as e:
logger.error_verbose('Failed to poll validators: %s', e)
logger.error_verbose('Failed to get validator exits: %s', e)

await asyncio.sleep(settings.poll_interval)

0 comments on commit f58f59d

Please sign in to comment.