Commit fff8b109 authored by sim's avatar sim

Use recommended setup for Celery

Note: does it improve anything?
parent 2940e0fb
from .celery import app as celery_app
"""
Setup the Celery instance (see also gargantext/__init__.py) that will be
used by all shared_task.
This is the recommended way:
http://docs.celeryproject.org/en/3.1/django/first-steps-with-django.html
"""
import os
from celery import Celery
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'gargantext.settings')
from django.conf import settings #noqa
app = Celery('gargantext')
app.config_from_object('django.conf:settings')
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment