File: celery.py

package info (click to toggle)
python-django-celery-results 2.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 696 kB
  • sloc: python: 2,373; makefile: 312; sh: 7; sql: 2
file content (13 lines) | stat: -rw-r--r-- 314 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
import os

from celery import Celery

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 't.proj.settings')

app = Celery('proj')

# Using a string here means the worker doesn't have to serialize
# the configuration object.
app.config_from_object('django.conf:settings', namespace='CELERY')

app.autodiscover_tasks()