MCPcopy
hub / github.com/celery/celery / Reject

Class Reject

celery/exceptions.py:194–203  ·  view source on GitHub ↗

A task can raise this if it wants to reject/re-queue the message.

Source from the content-addressed store, hash-verified

192
193
194class Reject(TaskPredicate):
195 """A task can raise this if it wants to reject/re-queue the message."""
196
197 def __init__(self, reason=None, requeue=False):
198 self.reason = reason
199 self.requeue = requeue
200 super().__init__(reason, requeue)
201
202 def __repr__(self):
203 return f'reject requeue={self.requeue}: {self.reason}'
204
205
206class ImproperlyConfigured(CeleryError):

Callers 10

reject_then_succeedFunction · 0.90
test_attrsMethod · 0.90
test_reprMethod · 0.90
test_get_log_policyMethod · 0.90
rejectingMethod · 0.90
retryMethod · 0.90
trace_taskFunction · 0.90

Calls

no outgoing calls

Tested by 6

test_attrsMethod · 0.72
test_reprMethod · 0.72
test_get_log_policyMethod · 0.72
rejectingMethod · 0.72