(self, curs)
return curs.fetchone()[0]
Allocate next batch. (internal)
Allocate next batch. (internal)
Allocate next batch . ( internal )
def _load_next_batch(self, curs):
        """Allocate next batch. (internal)"""

        if self.subconsumer_timeout:
            q = "select pgq_coop.next_batch(%s, %s, %s, %s)"
            curs.execute(q, [self.queue_name, self.consumer_name, self.subconsumer_name, self.subconsumer_timeout])
        else:
            q = "select pgq_coop.next_batch(%s, %s, %s)"
            curs.execute(q, [self.queue_name, self.consumer_name, self.subconsumer_name])
        return curs.fetchone()[0]
def _load_next_batch ( self , curs ) : if self . subconsumer_timeout : q = "select pgq_coop.next_batch(%s, %s, %s, %s)" curs . execute ( q , [ self . queue_name , self . consumer_name , self . subconsumer_name , self . subconsumer_timeout ] ) else : q = "select pgq_coop.next_batch(%s, %s, %s)" curs . execute ( q , [ self . queue_name , self . consumer_name , self . subconsumer_name ] ) return curs . fetchone ( ) [ 0 ]