Windows安装并使用Celery

来源:互联网 发布:olga软件 编辑:程序博客网 时间:2024/05/24 04:33

参考:

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上面使用没什么差别