Change the health check to ping the db and the redis build logs.
This commit is contained in:
parent
b3aba08426
commit
8b5c781f84
3 changed files with 27 additions and 3 deletions
|
@ -73,6 +73,13 @@ class RedisBuildLogs(object):
|
|||
|
||||
return json.loads(fetched) if fetched else None
|
||||
|
||||
def check_health(self):
|
||||
try:
|
||||
return self._redis.ping() == True
|
||||
except redis.ConnectionError:
|
||||
return False
|
||||
|
||||
|
||||
class BuildLogs(object):
|
||||
def __init__(self, app=None):
|
||||
self.app = app
|
||||
|
|
Reference in a new issue