Task that fails and is retried. Returns the priority.
(self, *args, expires=60.0, max_retries=1,
countdown=0.1)
| 246 | |
| 247 | @shared_task(bind=True, max_retries=1) |
| 248 | def 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) |