Created
December 16, 2019 20:27
-
-
Save aballah-chamakh/dd4e0bbbe6675806102628078ae712ba to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from celery import Celery | |
from django.conf import settings | |
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'MyApp.settings') | |
app = Celery('MyApp') | |
app.config_from_object('django.conf:settings') | |
app.autodiscover_tasks(settings.INSTALLED_APPS) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment