Skip to content

Commit f8f7927

Browse files
committed
Merge pull request #673 from helgi/better_verify_exception
fix(app): catch a higher level python-requests exception for verify application health
2 parents 1ae1e35 + 3105911 commit f8f7927

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

rootfs/api/models/app.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,9 @@ def verify_application_health(self, **kwargs):
461461
try:
462462
# http://docs.python-requests.org/en/master/user/advanced/#timeouts
463463
response = session.get(url, timeout=req_timeout)
464-
except requests.exceptions.ConnectTimeout:
465-
# We are fine with timeouts, lets keep trying
464+
except requests.exceptions.RequestException:
465+
# We are fine with timeouts and request problems, lets keep trying
466+
time.sleep(1) # just a bit of a buffer
466467
continue
467468

468469
# 30 second timeout (timout per request * 10)

0 commit comments

Comments
 (0)