Skip to content
Browse files

tweaking job docs

  • Loading branch information...
1 parent 2166c70 commit df7fe42c3ae9c2d485e933f90fa794602bb9b344 Matt George committed Jun 6, 2012
Showing with 7 additions and 3 deletions.
  1. +2 −2 docs/source/class.rst
  2. +5 −1 pyres/job.py
View
4 docs/source/class.rst
@@ -10,7 +10,7 @@ Job Classes
=================
.. autoclass:: pyres.job.Job
- :members:
+ :members:
Worker Classes
=================
@@ -25,4 +25,4 @@ Failure Classes
:members:
.. autoclass:: pyres.failure.RedisBackend
- :members:
+ :members:
View
6 pyres/job.py
@@ -60,7 +60,6 @@ def perform(self):
called regardless of whether an exception is ultimately thrown
by the perform method.
- #@ add entry_point loading
"""
payload_class_str = self._payload["class"]
@@ -106,6 +105,11 @@ def fail(self, exception):
return fail
def retry(self, payload_class, args):
+ """This method provides a way to retry a job after a failure.
+ If the jobclass defined by the payload containes a ``retry_every`` attribute then pyres
+ will attempt to retry the job until successful or until timeout defined by ``retry_timeout`` on the payload class.
+
+ """
retry_every = getattr(payload_class, 'retry_every', None)
retry_timeout = getattr(payload_class, 'retry_timeout', 0)

0 comments on commit df7fe42

Please sign in to comment.
Something went wrong with that request. Please try again.