Skip to content

Commit 4f135b6

Browse files
committed
fix(app): include timeout time for application health verification warning message
1 parent f86f595 commit 4f135b6

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
@@ -452,7 +452,7 @@ def verify_application_health(self, **kwargs):
452452
# http://docs.python-requests.org/en/master/user/advanced/#timeouts
453453
response = session.get(url, timeout=req_timeout)
454454

455-
# 1 minute timeout
455+
# 30 second timeout (timout per request * 10)
456456
if (time.time() - start) > (req_timeout * 10):
457457
break
458458

@@ -465,8 +465,9 @@ def verify_application_health(self, **kwargs):
465465

466466
# Endpoint did not report healthy in time
467467
if response.status_code == 404:
468+
delta = time.time() - start
468469
self.log(
469-
'Router was not ready to serve traffic to process type {} in time'.format(app_type), # noqa
470+
'Router was not ready to serve traffic to process type {} in time, waited {} seconds'.format(app_type, delta), # noqa
470471
level=logging.WARNING
471472
)
472473
return

0 commit comments

Comments
 (0)