Exemplo n.º 1
0
Arquivo: cli.py Projeto: k0nserv/flyby
def update(fqdn):
    logger.debug("Started job...")
    try:
        start_time = time.time()
        resolvers = Service.query_resolvers()
        services = Service.query_services()
        Haproxy().update(fqdn=fqdn, resolvers=resolvers, services=services)
        metrics.info('background-refresh.duration {}'.format(time.time() - start_time))
        metrics.info('active-thread-count {}'.format(threading.active_count()))
    finally:
        logger.debug("Finished job.")
Exemplo n.º 2
0
def query_resolvers():
    return flask.jsonify({'resolvers': Service.query_resolvers()})