Esempio n. 1
0
def health_elasticsearch():
    """
    Health check route designed to be regularly monitored in production (e.g. UptimeRobot)
    Returns 'yes' if and only if elasticsearch is up
    """
    if health_util.is_elasticsearch_alive():
        return make_response("yes")
    else:
        return make_response("no")
Esempio n. 2
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())
Esempio n. 3
0
def health_es():
    """
    Health check route designed to be regularly monitored in production (e.g. UptimeRobot)
    `yes` if Elastic Search is ok
    """
    return health_response(health_util.is_elasticsearch_alive())