(self, size)
Decrease outstanding CDX index lines and size.

        :param int size: size
Decrease outstanding CDX index lines and size.
Decrease outstanding CDX index lines and size .
def dec_pending_count_and_size(self, size):
        """Decrease outstanding CDX index lines and size.

        :param int size: size
        """
        # return if rec no longer exists (deleted while transfer is pending)
        if not self.redis.exists(self.info_key):
            return

        pending_count = self.PENDING_COUNT_KEY.format(rec=self.my_id)

        pending_size = self.PENDING_SIZE_KEY.format(rec=self.my_id)

        with redis_pipeline(self.redis) as pi:
            pi.incrby(pending_count, -1)
            pi.incrby(pending_size, -size)
            pi.expire(pending_count, self.PENDING_TTL)
            pi.expire(pending_size, self.PENDING_TTL)
def dec_pending_count_and_size ( self , size ) : # return if rec no longer exists (deleted while transfer is pending) if not self . redis . exists ( self . info_key ) : return pending_count = self . PENDING_COUNT_KEY . format ( rec = self . my_id ) pending_size = self . PENDING_SIZE_KEY . format ( rec = self . my_id ) with redis_pipeline ( self . redis ) as pi : pi . incrby ( pending_count , - 1 ) pi . incrby ( pending_size , - size ) pi . expire ( pending_count , self . PENDING_TTL ) pi . expire ( pending_size , self . PENDING_TTL )