ae5ce20ce73dd0ef54f93856ccd21c9f2b700179
[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.abspath(__file__)))
7 sys.path = [
8     os.path.join(ROOT, 'apps'),
9     os.path.join(ROOT, 'lib'),
10     os.path.join(ROOT, 'lib/librarian'),
11 ] + sys.path
12
13 os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'wolnelektury.settings')
14
15 from celery import Celery
16 from django.conf import settings
17
18 app = Celery('wolnelektury')
19
20 app.config_from_object('django.conf:settings')
21 app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)