Switch health to use a data interface
This commit is contained in:
parent
ca5a47edad
commit
4853634c2f
3 changed files with 22 additions and 3 deletions
12
health/models_interface.py
Normal file
12
health/models_interface.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
from abc import ABCMeta, abstractmethod
|
||||
from six import add_metaclass
|
||||
|
||||
@add_metaclass(ABCMeta)
|
||||
class HealthCheckDataInterface(object):
|
||||
"""
|
||||
Interface that represents all data store interactions required by health checks.
|
||||
"""
|
||||
@abstractmethod
|
||||
def check_health(self, app_config):
|
||||
""" Returns True if the connection to the database is healthy and False otherwise. """
|
||||
pass
|
Reference in a new issue