Yelp/python-gearman — pull request #24 by mikeyk (2012-06-11 19:58:46+00:00)
Title: Add RetryJob exception to force a job retry

Our current strategy for retrying work that fails because of transient issues (eg a DB error) is to sys.exit the worker and thus force gearman to retry the job. To avoid having to re-import and re-start the Python process, we added a custom Exception that can be thrown if the job is known to have failed for transient reasons.