请帮我解决这个问题,我运行时出现了以下提示:
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是蓝图。