2014-10-07 15 views
7

EDIT 2
Jeśli ktoś może po prostu po co schemat ma być, byłbym bardziej niż szczęśliwy! Po prostu muszę znać nazwy tabel i nazwy kolumn!Django Seler: djkombu_queue tabela nie stworzył

Obserwuję wzdłuż tego poradnika:

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

mam pip zainstalowane Django seler pomyślnie.

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

Kiedy biegnę 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 

Jednak, gdy biegnę python manage.py celery worker --loglevel=info I skończyć z:

OperationalError: no such table: djkombu_queue 

Próbowałem odinstalować i ponownie zainstalować wszystko, ale nie zostały w stanie zrozumieć, dlaczego ta tabela nie jest tworzona. Jak powstaje ta tabela?

EDIT Poprosiłem to pytanie po patrząc na inne pytanie, bo zmieniając ustawienia tak, aby:

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

)

LUB

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

Nadal prowadzi:

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 

Jednak djkombu_queue wciąż brakuje ...

+0

dodawania 'djcelery.transport' do zainstalowanych aplikacji i zrobić syncdb ponownie. – ChillarAnand

+0

możliwy duplikat [Dlaczego seler \ _taskmeta i inne tabele nie są tworzone podczas działania syncdb w django?] (Http://stackoverflow.com/questions/6959702/why-are-celery-taskmeta-and-other-tables -not-being-created-when-running-a-syncdb) – ChillarAnand

+0

jest bardzo podobny, ale użycie tej samej poprawki nie rozwiązało mojego problemu. Zobacz aktualizację. – DataSwede

Odpowiedz

0

spróbować tego:

dodawania djcelery.transport w INSTALLED_APPS

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

To nie rozwiązało problemu. Zobacz aktualizację. – DataSwede

0

Coś podziale między różnymi wersjami Django Django- Seler i Kombu podczas próby generowania tabel.

Udało mi się znaleźć Django 1.6.5, django-selera 3.1.16 i Kombu 3.0.21 WORKS.

6

Utknął z tym samym od 6 dni ...Dodaje się wreszcie rozwiązać go dla mnie: -

pip install django-kombu 

a następnie dodając djkombu do 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', 
) 

wtedy świeże syndb: -

python manage.py syncdb 

Można sprawdzić schemat z : -

python manage.py sqlall djkombu 
+0

Dziękuję bardzo @apratimankur, unikasz mnie 5 dni utknięcia. :). Inni nie działali. – ccsakuweb