(self, curs, batch_id, list)
Tag retry events.
Tag retry events.
Tag retry events .
def _flush_retry(self, curs, batch_id, list):
        """Tag retry events."""

        retry = 0
        if self.pgq_lazy_fetch:
            for ev_id, stat in list.iter_status():
                if stat[0] == EV_RETRY:
                    self._tag_retry(curs, batch_id, ev_id, stat[1])
                    retry += 1
                elif stat[0] != EV_DONE:
                    raise Exception("Untagged event: id=%d" % ev_id)
        else:
            for ev in list:
                if ev._status == EV_RETRY:
                    self._tag_retry(curs, batch_id, ev.id, ev.retry_time)
                    retry += 1
                elif ev._status != EV_DONE:
                    raise Exception("Untagged event: (id=%d, type=%s, data=%s, ex1=%s" % (
                                    ev.id, ev.type, ev.data, ev.extra1))

        # report weird events
        if retry:
            self.stat_increase('retry-events', retry)
def _flush_retry ( self , curs , batch_id , list ) : retry = 0 if self . pgq_lazy_fetch : for ev_id , stat in list . iter_status ( ) : if stat [ 0 ] == EV_RETRY : self . _tag_retry ( curs , batch_id , ev_id , stat [ 1 ] ) retry += 1 elif stat [ 0 ] != EV_DONE : raise Exception ( "Untagged event: id=%d" % ev_id ) else : for ev in list : if ev . _status == EV_RETRY : self . _tag_retry ( curs , batch_id , ev . id , ev . retry_time ) retry += 1 elif ev . _status != EV_DONE : raise Exception ( "Untagged event: (id=%d, type=%s, data=%s, ex1=%s" % ( ev . id , ev . type , ev . data , ev . extra1 ) ) # report weird events if retry : self . stat_increase ( 'retry-events' , retry )