def do_shards_show_recovery(self, args): try: parser = argparse.ArgumentParser(prog="shards_show_recovery") parser.add_argument( "-c", action="store_true", help="Do periodic query, use -t to set sleep time") parser.add_argument("-t", type=int, help="seconds between two query, use with -c", default=1) parser.add_argument("-l", type=int, help="Number of lines to print", default=-1) pargs = parser.parse_args(esc_utils.arrayArgs(args)) except: return if pargs.c: esc_utils.periodic(lambda: self.shards_show_recovery(pargs.l), pargs.t) return self.shards_show_recovery(pargs.l)
def do_cluster_pending_tasks(self, args=""): """ Ask the task list of the cluster. """ try: parser = argparse.ArgumentParser(prog="cluster_pending_tasks") parser.add_argument( "-c", action="store_true", help="Do periodic query, use -t to set sleep time") parser.add_argument("-t", type=int, help="seconds between two query, use with -c", default=1) parser.add_argument("-l", type=int, help="Number of lines to print", default=-1) pargs = parser.parse_args(esc_utils.arrayArgs(args)) except: return if pargs.c: esc_utils.periodic(lambda: self.cluster_pending_tasks(pargs.l), pargs.t) return self.cluster_pending_tasks(pargs.l)
def do_cluster_health(self, args=""): """ Provide system health """ try: parser = argparse.ArgumentParser(prog="cluster_health") parser.add_argument("-c", action="store_true", help="Do periodic query, use -t to set sleep time") parser.add_argument("-t", type=int, help="seconds between two query, use with -c", default=1) pargs = parser.parse_args(esc_utils.arrayArgs(args)) except: return if pargs.c: esc_utils.periodic(self.cluster_health, pargs.t) return self.cluster_health()
def do_shards_show_recovery(self, args): try: parser = argparse.ArgumentParser(prog="shards_show_recovery") parser.add_argument("-c", action="store_true", help="Do periodic query, use -t to set sleep time") parser.add_argument("-t", type=int, help="seconds between two query, use with -c", default=1) parser.add_argument("-l", type=int, help="Number of lines to print", default=-1) pargs = parser.parse_args(esc_utils.arrayArgs(args)) except: return if pargs.c: esc_utils.periodic(lambda: self.shards_show_recovery(pargs.l), pargs.t) return self.shards_show_recovery(pargs.l)
def do_cluster_pending_tasks(self, args=""): """ Ask the task list of the cluster. """ try: parser = argparse.ArgumentParser(prog="cluster_pending_tasks") parser.add_argument("-c", action="store_true", help="Do periodic query, use -t to set sleep time") parser.add_argument("-t", type=int, help="seconds between two query, use with -c", default=1) parser.add_argument("-l", type=int, help="Number of lines to print", default=-1) pargs = parser.parse_args(esc_utils.arrayArgs(args)) except: return if pargs.c: esc_utils.periodic(lambda: self.cluster_pending_tasks(pargs.l), pargs.t) return self.cluster_pending_tasks(pargs.l)
def do_cluster_health(self, args=""): """ Provide system health """ try: parser = argparse.ArgumentParser(prog="cluster_health") parser.add_argument( "-c", action="store_true", help="Do periodic query, use -t to set sleep time") parser.add_argument("-t", type=int, help="seconds between two query, use with -c", default=1) pargs = parser.parse_args(esc_utils.arrayArgs(args)) except: return if pargs.c: esc_utils.periodic(self.cluster_health, pargs.t) return self.cluster_health()