(self)
Show set status.
Show set status.
Show set status .
def cmd_status(self):
        """Show set status."""
        self.load_local_info()

        # prepare data for workers
        members = Queue.Queue()
        for m in self.queue_info.member_map.itervalues():
            cstr = self.add_connect_string_profile(m.location, 'remote')
            members.put( (m.name, cstr) )
        nodes = Queue.Queue()

        # launch workers and wait
        num_nodes = len(self.queue_info.member_map)
        num_threads = max (min (num_nodes / 4, 100), 1)
        tlist = []
        for i in range(num_threads):
            t = threading.Thread (target = self._cmd_status_worker, args = (members, nodes))
            t.daemon = True
            t.start()
            tlist.append(t)
        #members.join()
        for t in tlist:
            t.join()

        while True:
            try:
                node = nodes.get_nowait()
            except Queue.Empty:
                break
            self.queue_info.add_node(node)

        self.queue_info.print_tree()
def cmd_status ( self ) : self . load_local_info ( ) # prepare data for workers members = Queue . Queue ( ) for m in self . queue_info . member_map . itervalues ( ) : cstr = self . add_connect_string_profile ( m . location , 'remote' ) members . put ( ( m . name , cstr ) ) nodes = Queue . Queue ( ) # launch workers and wait num_nodes = len ( self . queue_info . member_map ) num_threads = max ( min ( num_nodes / 4 , 100 ) , 1 ) tlist = [ ] for i in range ( num_threads ) : t = threading . Thread ( target = self . _cmd_status_worker , args = ( members , nodes ) ) t . daemon = True t . start ( ) tlist . append ( t ) #members.join() for t in tlist : t . join ( ) while True : try : node = nodes . get_nowait ( ) except Queue . Empty : break self . queue_info . add_node ( node ) self . queue_info . print_tree ( )