【发布时间】:2020-04-15 18:17:48
【问题描述】:
请帮我解决这个问题,我在跑步时遇到了这个问题
celery -A app.celery worker --loglevel=info
错误:
Unable to load celery application.
The module app.celery was not found.
我的代码是--
# Celery Configuration
from celery import Celery
from app import app
print("App Name=",app.import_name)
celery=Celery(app.name,broker=app.config['CELERY_BROKER_URL'])
celery.conf.update(app.config)
@celery.task
def download_content():
return "hello"
目录结构-- newYoutube/app/auth/routes.py 并且这个函数存在于 routes.py auth 是蓝图。
【问题讨论】:
标签: python python-3.x flask celery celery-task