示例#1
0
def ping(ctx):
    logger.debug("pinging")
    try:
        containers = dl_lib.get_containers(ctx)
        container_paths = dl_lib.get_container_paths(containers)
        ping_containers(ctx, container_paths)
    except Exception as ex:
        logger.error("ping failed: %s" % ex, exc_info=True)
示例#2
0
def ping(ctx):
    logger.debug("pinging")
    try:
        containers = dl_lib.get_containers(ctx)
        container_paths = dl_lib.get_container_paths(containers)
        ping_containers(ctx, container_paths)
    except Exception as ex:
        logger.error("ping failed: %s" % ex, exc_info=True)
示例#3
0
def tag(ctx):
    logger.debug("tagging")
    try:
        containers = dl_lib.get_containers(ctx)
        container_paths = dl_lib.get_container_paths(containers)
        tag_containers(ctx, container_paths)
    except Exception as ex:
        logger.error("tagging failed: %s" % ex, exc_info=True)
    finally:
        time.sleep(ctx['tag_interval'])
示例#4
0
def tag(ctx):
    while True:
        logger.debug("tagging")
        try:
            containers = dl_lib.get_containers(ctx)
            container_paths = dl_lib.get_container_paths(containers)
            tag_containers(ctx, container_paths)
        except Exception as ex:
            logger.error("tagging failed: %s" % ex, exc_info=True)
        finally:
            time.sleep(ctx["tag_interval"])
示例#5
0
def get_container_hashes(containers):
    return set(map(dl_lib.hash_id, dl_lib.get_container_paths(containers)))
示例#6
0
def get_container_hashes(containers):
    return set(map(dl_lib.hash_id, dl_lib.get_container_paths(containers)))