def add_tag(db, tag):
id = tag.id
- # category = categories[tag.category] # localized names here?
- category = tag.category
+ category = categories[tag.category]
name = tag.name
sort_key = tag.sort_key
-Subproject commit ccc0df182c479eb554148e5bbc3fd9f6bec95e20
+Subproject commit 13b88a3bfdd4fa3cf5c92368aa5cb60fa832eda6
# MySQL-python>=1.2,<2.0
# celery tasks
-django-celery>=3.0.11,<3.1
-django-kombu
+django-celery>=3.1,<3.2
# spell checking
pyenchant
; =========================================
[program:celery.%(project_name)s]
-command=%(path)s/ve/bin/python %(path)s/releases/current/manage.py celeryd --loglevel=INFO
+command=%(path)s/ve/bin/celery -A wolnelektury worker -l info
directory=%(path)s/releases/current/
user=%(user)s
numprocs=2
+from .celery import app as celery_app
--- /dev/null
+from __future__ import absolute_import
+
+import os
+import sys
+
+ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+sys.path = [
+ os.path.join(ROOT, 'apps'),
+ os.path.join(ROOT, 'lib'),
+ os.path.join(ROOT, 'lib/librarian'),
+] + sys.path
+
+os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'wolnelektury.settings')
+
+from celery import Celery
+from django.conf import settings
+
+app = Celery('wolnelektury')
+
+app.config_from_object('django.conf:settings')
+app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
'south',
'sorl.thumbnail',
'djcelery',
- 'djkombu',
+ 'kombu.transport.django',
'honeypot',
#'django_nose',
'fnpdjango',
-import djcelery
-djcelery.setup_loader()
-
-BROKER_BACKEND = "djkombu.transport.DatabaseTransport"
-BROKER_HOST = "localhost"
-BROKER_PORT = 5672
-BROKER_USER = "guest"
-BROKER_PASSWORD = "guest"
-BROKER_VHOST = "/"
+BROKER_URL = 'django://'
+CELERY_RESULT_BACKEND='djcelery.backends.database:DatabaseBackend'
CELERY_EAGER_PROPAGATES_EXCEPTIONS = True
CELERY_SEND_TASK_ERROR_EMAILS = True
+CELERY_ACCEPT_CONTENT = ['pickle']