continue if ping returns an error
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-10-12 17:45:06 +02:00
parent 10f3204f5a
commit 5731624450

View File

@@ -44,7 +44,10 @@ async def health_check():
ping_timeout = int(os.getenv('PING_TIMEOUT', '60'))
_logger.info('Reporting own health to: %s', f'{ping_url}{ping_id}')
while True:
try:
requests.get(f'{ping_url}{ping_id}')
except requests.exceptions.ConnectionError as e:
continue
await asyncio.sleep(ping_timeout)
if __name__ == '__main__':