Windows安装并使用Celery

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/dszgf5717/article/details/76945492

参考:

http://www.cnblogs.com/Soar-Pang/p/6524407.html

http://docs.celeryproject.org/en/latest/faq.html#does-celery-support-windows

Windows使用celery只能安装 3.1.25版

pip install celery==3.1.25

运行celery:

python -m celery worker -A services.task

配置参考:

CELERY_BROKER = 'sqla+sqlite:///data/celery.db'
app = Celery('send', broker=CELERY_BROKER)
app.conf.update(
    CELERY_TASK_SERIALIZER='json',
    CELERY_ACCEPT_CONTENT=['json'],  # Ignore other content
    CELERY_RESULT_SERIALIZER='json',
    CELERYD_CONCURRENCY = 1
)

其他使用与linux上面使用没什么差别

展开阅读全文

没有更多推荐了,返回首页