def stats_incr(self, key, value=1):
        """Increment the specified key in the per-message measurements

        .. versionadded:: 3.13.0

        .. note:: If this method is called when there is not a message being
            processed, a message will be logged at the ``warning`` level to
            indicate the value is being dropped. To suppress these warnings,
            set the :attr:`rejected.consumer.Consumer.IGNORE_OOB_STATS`
            attribute to :data:`True`.

        :param key: The key to increment
        :type key: :class:`str`
        :param value: The value to increment the key by
        :type value: :class:`int`

        """
        if not self._measurement:
            if not self.IGNORE_OOB_STATS:
                self.logger.warning('stats_incr invoked outside execution')
            return
        self._measurement.incr(key, value)
def stats_incr ( self , key , value = 1 ) : if not self . _measurement : if not self . IGNORE_OOB_STATS : self . logger . warning ( 'stats_incr invoked outside execution' ) return self . _measurement . incr ( key , value )
Increment the specified key in the per-message measurements

        .. versionadded:: 3.13.0

        .. note:: If this method is called when there is not a message being
            processed, a message will be logged at the ``warning`` level to
            indicate the value is being dropped. To suppress these warnings,
            set the :attr:`rejected.consumer.Consumer.IGNORE_OOB_STATS`
            attribute to :data:`True`.

        :param key: The key to increment
        :type key: :class:`str`
        :param value: The value to increment the key by
        :type value: :class:`int`