First delivery: store SUCCESS manually, then Reject to trigger redelivery. Second delivery: dedup finds SUCCESS, dispatches chain.
(self)
| 524 | |
| 525 | @shared_task(bind=True, acks_late=True) |
| 526 | def store_success_then_reject(self): |
| 527 | """First delivery: store SUCCESS manually, then Reject to trigger redelivery. |
| 528 | Second delivery: dedup finds SUCCESS, dispatches chain.""" |
| 529 | from celery.backends.base import states |
| 530 | if not self.request.delivery_info.get('redelivered'): |
| 531 | self.backend.store_result(self.request.id, 'first-pass', states.SUCCESS) |
| 532 | raise Reject(requeue=True) |
| 533 | # When dedup is enabled the fast-path intercepts before reaching here, |
| 534 | # so 'dedup-pass' is only returned when dedup is disabled. |
| 535 | return 'dedup-pass' |
| 536 | |
| 537 | |
| 538 | @shared_task(bind=True, acks_late=True) |
nothing calls this directly
no test coverage detected