MCPcopy
hub / github.com/celery/celery / retry_once_priority

Function retry_once_priority

t/integration/tasks.py:248–254  ·  view source on GitHub ↗

Task that fails and is retried. Returns the priority.

(self, *args, expires=60.0, max_retries=1,
                        countdown=0.1)

Source from the content-addressed store, hash-verified

246
247@shared_task(bind=True, max_retries=1)
248def retry_once_priority(self, *args, expires=60.0, max_retries=1,
249 countdown=0.1):
250 """Task that fails and is retried. Returns the priority."""
251 if self.request.retries:
252 return self.request.delivery_info['priority']
253 raise self.retry(countdown=countdown,
254 max_retries=max_retries)
255
256
257@shared_task(bind=True, max_retries=1)

Callers

nothing calls this directly

Calls 1

retryMethod · 0.80

Tested by

no test coverage detected