(self, params)
Show consumer status
Show consumer status
Show consumer status
def cmd_show_consumer(self, params):
        """Show consumer status"""
        consumer = params.get('consumer', '*')
        queue = params.get('queue', '*')

        q_queue = (queue != '*' and queue or None)
        q_consumer = (consumer != '*' and consumer or None)

        curs = self.db.cursor()
        q = "select * from pgq.get_consumer_info(%s, %s)"
        curs.execute(q, [q_queue, q_consumer])

        display_result(curs, 'Consumer "%s" on queue "%s":' % (consumer, queue))
def cmd_show_consumer ( self , params ) : consumer = params . get ( 'consumer' , '*' ) queue = params . get ( 'queue' , '*' ) q_queue = ( queue != '*' and queue or None ) q_consumer = ( consumer != '*' and consumer or None ) curs = self . db . cursor ( ) q = "select * from pgq.get_consumer_info(%s, %s)" curs . execute ( q , [ q_queue , q_consumer ] ) display_result ( curs , 'Consumer "%s" on queue "%s":' % ( consumer , queue ) )