094a7a7c254c74715814e0e9375466e1968d63e0
[wolnelektury.git] / src / wolnelektury / celery.py
1 from __future__ import absolute_import
2
3 import os
4 import sys
5
6 ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
7 sys.path = [
8     os.path.join(ROOT, 'lib/librarian'),
9 ] + sys.path
10
11 os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'wolnelektury.settings')
12
13 from celery import Celery
14 from django.conf import settings
15
16 app = Celery('wolnelektury')
17
18 app.config_from_object('django.conf:settings')
19 app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)