Skip to content

Instantly share code, notes, and snippets.

@tonywangcn
Created February 24, 2017 16:56
Show Gist options
  • Save tonywangcn/367fdd1062eabf0801672e171e9ba324 to your computer and use it in GitHub Desktop.
Save tonywangcn/367fdd1062eabf0801672e171e9ba324 to your computer and use it in GitHub Desktop.
from __future__ import absolute_import
from test_celery.celery import app
import time
@app.task
def longtime_add(x,y):
print 'long time task begins'
time.sleep(5)
print 'long time task finished'
return x + y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment