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)
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)
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'])
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"])
def get_container_hashes(containers): return set(map(dl_lib.hash_id, dl_lib.get_container_paths(containers)))
def get_container_hashes(containers): return set(map(dl_lib.hash_id, dl_lib.get_container_paths(containers)))