1. 首先进入虚拟环境:
***:~/piaoshifu_object/epiao.piaoshifu.cn$ source /home/wyl/piaoshifu_virtualenv/epiaoenv/bin/activate (epiaoenv) ***:~/piaoshifu_object/epiao.piaoshifu.cn$
2. 启动celery:
***:~/piaoshifu_object/epiao.piaoshifu.cn$ python manage.py celery worker
3. 报错:
***:~/piaoshifu_object/epiao.piaoshifu.cn$ python manage.py celery worker Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 338, in execute_from_command_line utility.execute() File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 312, in execute django.setup() File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 18, in setup apps.populate(settings.INSTALLED_APPS) File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 85, in populate app_config = AppConfig.create(entry) File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 86, in create module = import_module(entry) File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) File "/usr/local/lib/python2.7/dist-packages/kombu/transport/django/__init__.py", line 14, in <module> from .models import Queue File "/usr/local/lib/python2.7/dist-packages/kombu/transport/django/models.py", line 6, in <module> from .managers import QueueManager, MessageManager File "/usr/local/lib/python2.7/dist-packages/kombu/transport/django/managers.py", line 46, in <module> class MessageManager(models.Manager): File "/usr/local/lib/python2.7/dist-packages/kombu/transport/django/managers.py", line 50, in MessageManager @transaction.commit_manually AttributeError: ‘module‘ object has no attribute ‘commit_manually‘
问题解决之路:
启动celery的时候提示:AttributeError: 'module' object has no attribute 'commit_manually'错误
时间: 2024-10-11 06:51:16