def listq(queues): Disque.connect(["localhost:7711"]) qstat = Disque.qstat(queues) queues = sorted(qstat.keys()) for name in queues: try: queue = qstat[name] print_queue(name, queue) except KeyError: print('invalid queue "%s"' % name)
def listq(args): Disque.connect([args.disque_url]) queues = args.queues qstat = Disque.qstat(queues) queues = sorted(qstat.keys()) for name in queues: try: queue = qstat[name] print_queue(name, queue) except KeyError: print('invalid queue "%s"' % name)