编辑2
如果有人可以发布架构应该是什么,我会更加高兴!我只需要知道表名和列名!Django-Celery:djkombu_queue表没有创建
我沿着这个教程如下:
http://www.caktusgroup.com/blog/2014/06/23/scheduling-tasks-celery/
我已经成功地点子安装的Django,芹菜。
#settings.py
import djcelery
djcelery.setup_loader()
BROKER_URL = 'django://'
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'charts',
'social.apps.django_app.default',
'django.contrib.staticfiles',
'djcelery',
'kombu.transport.django',
)
当我运行python manage.py syncdb
:
Creating tables ...
Creating table django_admin_log
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_groups
Creating table auth_user_user_permissions
Creating table auth_user
Creating table django_content_type
Creating table django_session
Creating table social_auth_usersocialauth
Creating table social_auth_nonce
Creating table social_auth_association
Creating table social_auth_code
Creating table celery_taskmeta
Creating table celery_tasksetmeta
Creating table djcelery_intervalschedule
Creating table djcelery_crontabschedule
Creating table djcelery_periodictasks
Creating table djcelery_periodictask
Creating table djcelery_workerstate
Creating table djcelery_taskstate
然而,当我运行python manage.py celery worker --loglevel=info
我结束了:
OperationalError: no such table: djkombu_queue
我已经试过卸载并重新安装一切,但一直没能够弄清楚为什么这张桌子没有被创建。如何创建这个表格?
编辑 我问这个问题在看其他的问题,因为更改设置后:
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'charts',
'social.apps.django_app.default',
'djcelery',
'kombu.transport.django',
'djcelery.transport',
)
OR
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'charts',
'social.apps.django_app.default',
'djcelery',
'djcelery.transport',
)
仍然导致:
Creating tables ...
Creating table django_admin_log
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_groups
Creating table auth_user_user_permissions
Creating table auth_user
Creating table django_content_type
Creating table django_session
Creating table social_auth_usersocialauth
Creating table social_auth_nonce
Creating table social_auth_association
Creating table social_auth_code
Creating table celery_taskmeta
Creating table celery_tasksetmeta
Creating table djcelery_intervalschedule
Creating table djcelery_crontabschedule
Creating table djcelery_periodictasks
Creating table djcelery_periodictask
Creating table djcelery_workerstate
Creating table djcelery_taskstate
然而djkombu_queue
至今下落不明......
加上'djcelery.transport'到安装的应用程序,并再次做执行syncdb。 – ChillarAnand 2014-10-08 02:45:42
[为什么在django中运行syncdb时没有创建celery \ _taskmeta和其他表?](http://stackoverflow.com/questions/6959702/why-are-celery-taskmeta-and-other-tables -not-being-being-running-running-a-syncdb) – ChillarAnand 2014-10-08 02:46:39
它非常相似,但是使用相同的修复程序并未解决我的问题。查看更新。 – DataSwede 2014-10-08 13:21:57