Skip to content

Instantly share code, notes, and snippets.

@tonywangcn
Created February 24, 2017 16:56
Show Gist options
  • Save tonywangcn/16c1ee6b2bc4f2dd4e305fbe47607cdf to your computer and use it in GitHub Desktop.
Save tonywangcn/16c1ee6b2bc4f2dd4e305fbe47607cdf 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