File: celery.py

package info (click to toggle)
python-django-celery-beat 2.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,112 kB
  • sloc: python: 3,440; makefile: 319; sh: 22
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()