From aed7e67a173ad9bac628fc4342da531276bf8f41 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Sun, 2 Nov 2014 15:42:59 -0500 Subject: [PATCH] Clarify the health checking logic and remove the accidental inclusion of the override --- health/healthcheck.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/health/healthcheck.py b/health/healthcheck.py index be532a2fd..69d389e89 100644 --- a/health/healthcheck.py +++ b/health/healthcheck.py @@ -49,8 +49,7 @@ class ProductionHealthCheck(HealthCheck): def check_name(cls): return 'ProductionHealthCheck' - def conduct_healthcheck(self, db_healthy, buildlogs_healthy): - db_healthy = False + def conduct_healthcheck(self, db_healthy, buildlogs_healthy): data = { 'db_healthy': db_healthy, 'buildlogs_healthy': buildlogs_healthy @@ -78,7 +77,8 @@ class ProductionHealthCheck(HealthCheck): data['db_available_checked'] = True data['db_available_status'] = is_rds_working - if is_rds_working: - return (data, True) + # If RDS is down, then we still report the machine as healthy, so that it can handle + # requests once RDS comes back up. + return (data, not is_rds_working) return (data, db_healthy) \ No newline at end of file