Fix tuple for health check

This commit is contained in:
Joseph Schorr 2017-10-12 16:25:31 -04:00
parent 7e63184ab4
commit c1ce84822d

View file

@ -12,10 +12,10 @@ def check_health(app_config):
try: try:
validate_database_url(app_config['DB_URI'], {}, connect_timeout=3) validate_database_url(app_config['DB_URI'], {}, connect_timeout=3)
except Exception as ex: except Exception as ex:
return (False, 'Could not connect to the database: %s', ex.message) return (False, 'Could not connect to the database: %s' % ex.message)
# We will connect to the db, check that it contains some team role kinds # We will connect to the db, check that it contains some team role kinds
try: try:
return (bool(list(TeamRole.select().limit(1))), 'Could not connect to the database') return (bool(list(TeamRole.select().limit(1))), 'Could not connect to the database')
except Exception as ex: except Exception as ex:
return (False, 'Could not connect to the database: %s', ex.message) return (False, 'Could not connect to the database: %s' % ex.message)