Skip to content

Commit df7fe42

Browse files
author
Matt George
committed
tweaking job docs
1 parent 2166c70 commit df7fe42

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

docs/source/class.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Job Classes
1010
=================
1111

1212
.. autoclass:: pyres.job.Job
13-
:members:
13+
:members:
1414

1515
Worker Classes
1616
=================
@@ -25,4 +25,4 @@ Failure Classes
2525
:members:
2626

2727
.. autoclass:: pyres.failure.RedisBackend
28-
:members:
28+
:members:

pyres/job.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ def perform(self):
6060
called regardless of whether an exception is ultimately thrown
6161
by the perform method.
6262
63-
#@ add entry_point loading
6463
6564
"""
6665
payload_class_str = self._payload["class"]
@@ -106,6 +105,11 @@ def fail(self, exception):
106105
return fail
107106

108107
def retry(self, payload_class, args):
108+
"""This method provides a way to retry a job after a failure.
109+
If the jobclass defined by the payload containes a ``retry_every`` attribute then pyres
110+
will attempt to retry the job until successful or until timeout defined by ``retry_timeout`` on the payload class.
111+
112+
"""
109113
retry_every = getattr(payload_class, 'retry_every', None)
110114
retry_timeout = getattr(payload_class, 'retry_timeout', 0)
111115

0 commit comments

Comments
 (0)