Skip to content

Commit

Permalink
Check Hasura heartbeat response code (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
droserasprout authored Jun 24, 2021
1 parent 488c5be commit 2ce168b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/dipdup/hasura.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ async def configure_hasura(config: DipDupConfig):
_logger.info('Waiting for Hasura instance to be healthy')
for _ in range(60):
with suppress(ClientConnectorError, ClientOSError):
await session.get(f'{url}/healthz')
break
response = await session.get(f'{url}/healthz')
if response.status == 200:
break
await asyncio.sleep(1)
else:
_logger.error('Hasura instance not responding for 60 seconds')
Expand Down

0 comments on commit 2ce168b

Please sign in to comment.