(self)
return res
Registration for subconsumer.
Registration for subconsumer.
Registration for subconsumer .
def register_consumer(self):
        """Registration for subconsumer."""

        self.log.info("Registering consumer on source queue")
        db = self.get_database(self.db_name)
        cx = db.cursor()
        cx.execute("select pgq_coop.register_subconsumer(%s, %s, %s)",
                [self.queue_name, self.consumer_name, self.subconsumer_name])
        res = cx.fetchone()[0]
        db.commit()

        return res
def register_consumer ( self ) : self . log . info ( "Registering consumer on source queue" ) db = self . get_database ( self . db_name ) cx = db . cursor ( ) cx . execute ( "select pgq_coop.register_subconsumer(%s, %s, %s)" , [ self . queue_name , self . consumer_name , self . subconsumer_name ] ) res = cx . fetchone ( ) [ 0 ] db . commit ( ) return res