nsq/message.py
def requeue(self, **kwargs):
        """
        Respond to ``nsqd`` that you've failed to process this message successfully (and would
        like it to be requeued).

        :param backoff: whether or not :class:`nsq.Reader` should apply backoff handling
        :type backoff: bool

        :param delay: the amount of time (in seconds) that this message should be delayed
            if -1 it will be calculated based on # of attempts
        :type delay: int
        """

        # convert delay to time_ms for fixing
        # https://github.com/nsqio/pynsq/issues/71 and maintaining
        # backward compatibility
        if 'delay' in kwargs and isinstance(kwargs['delay'], int) and kwargs['delay'] >= 0:
            kwargs['time_ms'] = kwargs['delay'] * 1000

        assert not self._has_responded
        self._has_responded = True
        self.trigger(event.REQUEUE, message=self, **kwargs)
def requeue(self, **kwargs):
        """
        Respond to ``nsqd`` that you've failed to process this message successfully (and would
        like it to be requeued).

        :param backoff: whether or not :class:`nsq.Reader` should apply backoff handling
        :type backoff: bool

        :param delay: the amount of time (in seconds) that this message should be delayed
            if -1 it will be calculated based on # of attempts
        :type delay: int
        """

        # convert delay to time_ms for fixing
        # https://github.com/nsqio/pynsq/issues/71 and maintaining
        # backward compatibility
        if 'delay' in kwargs and isinstance(kwargs['delay'], int) and kwargs['delay'] >= 0:
            kwargs['time_ms'] = kwargs['delay'] * 1000

        assert not self._has_responded
        self._has_responded = True
        self.trigger(event.REQUEUE, message=self, **kwargs)
Respond to ``nsqd`` that you've failed to process this message successfully (and would
        like it to be requeued).

        :param backoff: whether or not :class:`nsq.Reader` should apply backoff handling
        :type backoff: bool

        :param delay: the amount of time (in seconds) that this message should be delayed
            if -1 it will be calculated based on # of attempts
        :type delay: int