Skip to content

Commit 1bf397e

Browse files
committed
Docstring for on_retry
1 parent 9b5cfdf commit 1bf397e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

readthedocs/projects/tasks/builds.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,15 @@ def on_success(self, retval, task_id, args, kwargs):
471471
self.data.build['success'] = True
472472

473473
def on_retry(self, exc, task_id, args, kwargs, einfo):
474+
"""
475+
Celery helper called when the task is retried.
476+
477+
This happens when any of the exceptions defined in ``autoretry_for``
478+
argument is raised or when ``self.retry`` is called from inside the
479+
task.
480+
481+
See https://docs.celeryproject.org/en/master/userguide/tasks.html#retrying
482+
"""
474483
log.info('Retrying this task.')
475484

476485
if isinstance(exc, BuildMaxConcurrencyError):

0 commit comments

Comments
 (0)