|
492
|
1 |
# -*- coding: utf-8 -*- |
|
|
2 |
''' |
|
|
3 |
Created on Mar 7, 2015 |
|
|
4 |
|
|
|
5 |
@author: ymh |
|
|
6 |
''' |
|
|
7 |
from __future__ import absolute_import |
|
|
8 |
|
|
|
9 |
import os |
|
|
10 |
|
|
|
11 |
from django.conf import settings |
|
|
12 |
|
|
|
13 |
from celery import Celery |
|
|
14 |
|
|
|
15 |
# set the default Django settings module for the 'celery' program. |
|
|
16 |
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'hdalab.settings') |
|
|
17 |
|
|
|
18 |
app = Celery('hdalab') |
|
|
19 |
|
|
|
20 |
# Using a string here means the worker will not have to |
|
|
21 |
# pickle the object when using Windows. |
|
|
22 |
app.config_from_object('django.conf:settings') |
|
|
23 |
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS) |