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