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
|
@ -1647,3 +1647,11 @@ def delete_user(user):
|
|||
user.delete_instance(recursive=True, delete_nullable=True)
|
||||
|
||||
# TODO: also delete any repository data associated
|
||||
|
||||
def check_health():
|
||||
# We will connect to the db, check that it contains some log entry kinds
|
||||
try:
|
||||
found_count = LogEntryKind.select().count()
|
||||
return found_count > 0
|
||||
except:
|
||||
return False
|
||||
|
|
Reference in a new issue