http://docs.celeryproject.org/en/latest/getting-started/first-steps-with-celery.html#application
里面的代碼:
from celery import Celery
app = Celery('tasks', broker='redis://127.0.0.1:6379/0')
@app.task
def add(x, y):
return x + y
app可以叫任何名字莫绣, 比如celery闪盔, xyz 等等哼转, 啟動方式都一樣
celery -A tasks worker --loglevel=info