Skip to content

Instantly share code, notes, and snippets.

@aballah-chamakh
Created November 17, 2019 06:09
Show Gist options
  • Save aballah-chamakh/5e3c756c3bc3cb37bd2e8c872c8ce8ec to your computer and use it in GitHub Desktop.
Save aballah-chamakh/5e3c756c3bc3cb37bd2e8c872c8ce8ec 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