2014-10-07 14 views
7

EDIT 2
Wenn jemand nur nach, was das Schema sein soll, würde ich mehr als glücklich sein! Ich muss nur die Tabellennamen und Spaltennamen wissen!Django-Sellerie: djkombu_queue Tabelle nicht erstellt

Ich folge auf diesem Tutorial:

http://www.caktusgroup.com/blog/2014/06/23/scheduling-tasks-celery/

ich erfolgreich installiert django-Sellerie haben pip.

#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', 
) 

Wenn ich laufe 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 

Allerdings, wenn ich python manage.py celery worker --loglevel=info laufe ich am Ende mit:

OperationalError: no such table: djkombu_queue 

Ich habe versucht zu deinstallieren und alles neu installieren, aber noch nicht gewesen kann herausfinden, warum diese Tabelle nicht erstellt wird. Wie bekommt man diese Tabelle erstellt?

EDIT ich diese Frage gestellt, nachdem bei der anderen Frage suchen, weil Einstellungen zu ändern:

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', 

)

ODER

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', 
) 

Noch ergibt:

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 

jedoch die djkombu_queue noch fehlt ...

+0

Add 'djcelery.transport' zu installierten Anwendungen und wieder syncdb tun. – ChillarAnand

+0

mögliches Duplikat von [Warum werden Sellerie \ _taskmeta und andere Tabellen beim Ausführen einer syncdb in django nicht erstellt?] (Http://stackoverflow.com/questions/6959702/why-are-sellery-taskmeta-and-other-tables) -nicht-erstellt-wenn-läuft-ein-syncdb) – ChillarAnand

+0

es ist sehr ähnlich, aber mit dem gleichen Fix hat mein Problem nicht gelöst. Siehe Aktualisierung. – DataSwede

Antwort

0

versuchen, dieses:

Add djcelery.transport in INSTALLED_APPS

INSTALLED_APPS = ('djcelery.transport',) 
+0

Das behebt das Problem nicht. Siehe Aktualisierung. – DataSwede

0

Etwas zwischen den verschiedenen Versionen von Django, Django- gebrochen Sellerie und Kombu beim Versuch, die Tische zu generieren.

Ich habe gefunden, dass Django 1.6.5, Django-Sellerie 3.1.16 und Kombu 3.0.21 funktioniert.

6

Hatte mit dem gleichen Ding seit 6 Tagen festgefahren ...Die folgende gelöst schließlich für mich: -

pip install django-kombu 

und dann Zugabe djkombu-INSTALLED APPS: -

INSTALLED_APPS = (
    'django.contrib.auth', 
    'django.contrib.contenttypes', 
    'django.contrib.sessions', 
    'django.contrib.sites', 
    'django.contrib.messages', 
    'django.contrib.staticfiles', 
    'django.contrib.admin', 
    'django.contrib.admindocs', 
    'djcelery', 
    'djkombu', 
    'app1', 
    'app2', 
    'app3', 
    'app4', 
) 

Dann eine frische syndb: -

python manage.py syncdb 

Sie das Schema überprüfen mit :

python manage.py sqlall djkombu 
+0

Vielen Dank @apratimankur, Sie vermeiden mich 5 Tage stecken zu bleiben. :). Die anderen haben nicht funktioniert. – ccsakuweb

Verwandte Themen