Skip to content

Instantly share code, notes, and snippets.

@dlutcat
Created July 30, 2013 06:44
Show Gist options
  • Save dlutcat/6110810 to your computer and use it in GitHub Desktop.
Save dlutcat/6110810 to your computer and use it in GitHub Desktop.
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