Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@simondlr
Created June 5, 2012 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simondlr/2876406 to your computer and use it in GitHub Desktop.
Save simondlr/2876406 to your computer and use it in GitHub Desktop.
tasks.py
from djcelery import celery
@celery.task
def add(x,y):
return x + y
@celery.task
def sleeptask(i):
from time import sleep
sleep(i)
return i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment