首先进入venv,然后直接用pip安装celery即可。 celery_server.py # coding: utf-8from celery import Celerymq = Celery('QwbCelery', broker='redis://localhost:6379/0', backend='redis://localhost:6379/0')mq = Celery('QwbCelery')mq.conf.update( CELERY_ACCEPT_CONTENT=['pickle'], CELERY_ENABLE_UTC=True, CELERY_RESULT_BACKEND='redis://localhost:6379/0', CELERYD_LOG_COLOR=False, BROKER_URL='redis://localhost:6379/0', CELERY_TIMEZONE='UTC',)mq.conf.update( CELERY_IMPORTS=[ 'tasks.task1', ]) IMPORTS中
发表于 2017-07-12 13:30:43 | 条评论 | 阅读次数:89
Copyright © 2017 - 2018 qwb's blog
blog.csustacm.com All Rights Reserved
Powered by qwb Contact me