MCPcopy
hub / github.com/celery/celery / reject_then_succeed

Function reject_then_succeed

t/integration/tasks.py:539–543  ·  view source on GitHub ↗

First delivery: Reject(requeue=True). Second delivery: succeed normally.

(self)

Source from the content-addressed store, hash-verified

537
538@shared_task(bind=True, acks_late=True)
539def reject_then_succeed(self):
540 """First delivery: Reject(requeue=True). Second delivery: succeed normally."""
541 if not self.request.delivery_info.get('redelivered'):
542 raise Reject(requeue=True)
543 return 'second-pass'
544
545
546@shared_task(soft_time_limit=2, time_limit=1)

Callers

nothing calls this directly

Calls 2

RejectClass · 0.90
getMethod · 0.45

Tested by

no test coverage detected