Beispiel #1
0
def health_db():
    """
    Health check route designed to be regularly monitored in production (e.g. UptimeRobot)
    Returns 'yes' if and only if the db is up
    """
    if health_util.is_db_alive():
        return make_response("yes")
    else:
        return make_response("no")
Beispiel #2
0
def health_all():
    """
    Health check route designed to be regularly monitored in production (e.g. UptimeRobot)
    Returns 'yes' if and only if the whole stack is up.
    """
    if health_util.is_db_alive() and health_util.is_elasticsearch_alive():
        return make_response("yes")
    else:
        return make_response("no")
Beispiel #3
0
def health_all():
    """
    Health check route designed to be regularly monitored in production (e.g. UptimeRobot).
    Returns `yes` if internal dependencies (Elastic Search, Database, Uwsgi) are all ok.
    Does not check external dependencies (IGN) nor Redis.    
    """
    return health_response(health_util.is_db_alive()
                           and health_util.is_elasticsearch_alive()
                           and health_util.is_uwsgi_alive())
Beispiel #4
0
def health_db():
    """
    Health check route designed to be regularly monitored in production (e.g. UptimeRobot)
    `yes` if Database is ok
    """
    return health_response(health_util.is_db_alive())
Beispiel #5
0
def health_all():
    """
    Health check route designed to be regularly monitored in production (e.g. UptimeRobot)
    `yes` if Elastic Search and Database are ok
    """
    return health_response(health_util.is_db_alive() and health_util.is_elasticsearch_alive())