bootstrap project
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-11-24 17:05:02 +01:00
parent 1d88225ff2
commit 0b2901ec3b
10 changed files with 233 additions and 0 deletions

23
src/healthchecks.py Normal file
View File

@@ -0,0 +1,23 @@
#!/usr/bin/env python3
from db import db
"""
Healthchek functions
"""
__author__ = "@tormakris"
__copyright__ = "Copyright 2020, videON Team"
__module_name__ = "healthchecks"
__version__text__ = "1"
def health_database_status():
is_database_working = True
output = 'database is ok'
try:
db.session.execute('SELECT 1')
except Exception as e:
output = str(e)
is_database_working = False
return is_database_working, output