Skip to content

Instantly share code, notes, and snippets.

@aballah-chamakh
Created December 16, 2019 20:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aballah-chamakh/dd4e0bbbe6675806102628078ae712ba to your computer and use it in GitHub Desktop.
Save aballah-chamakh/dd4e0bbbe6675806102628078ae712ba to your computer and use it in GitHub Desktop.
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