|
@@ -955,13 +955,12 @@ Example requeuing the message:
|
|
|
|
|
|
.. code-block:: python
|
|
.. code-block:: python
|
|
|
|
|
|
- import errno
|
|
|
|
from celery.exceptions import Reject
|
|
from celery.exceptions import Reject
|
|
|
|
|
|
@app.task(bind=True, acks_late=True)
|
|
@app.task(bind=True, acks_late=True)
|
|
def requeues(self):
|
|
def requeues(self):
|
|
if not self.request.delivery_info['redelivered']:
|
|
if not self.request.delivery_info['redelivered']:
|
|
- raise Requeue('no reason', requeue=True)
|
|
|
|
|
|
+ raise Reject('no reason', requeue=True)
|
|
print('received two times')
|
|
print('received two times')
|
|
|
|
|
|
Consult your broker documentation for more details about the ``basic_reject``
|
|
Consult your broker documentation for more details about the ``basic_reject``
|