Clarify the health checking logic and remove the accidental inclusion of the override

This commit is contained in:
Joseph Schorr 2014-11-02 15:42:59 -05:00
parent 98602a2d0c
commit aed7e67a17

View file

@ -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)