Created
July 30, 2013 06:44
-
-
Save dlutcat/6110810 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from jobs.celeryapp import celery | |
@celery.task(name="crons.spider.add") | |
def add(x, y): | |
try: | |
raise Exception('This is a Exception') | |
return x + y | |
except Exception, exc: | |
raise add.retry(exc=exc, countdown=5, max_retries=2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment