Skip to content

Instantly share code, notes, and snippets.

@borodedamie
Created January 28, 2023 10:02
Show Gist options
  • Save borodedamie/317787689541b57776b9782d69be50bc to your computer and use it in GitHub Desktop.
Save borodedamie/317787689541b57776b9782d69be50bc to your computer and use it in GitHub Desktop.
from __future__ import absolute_import, unicode_literals
import os
from celery import Celery
from datetime import timedelta
os.environ.setdefault('DJANGO_SETTINGS_MODULE', '<project name>.settings')
app = Celery('<project name>')
app.config_from_object('django.conf:settings', namespace='CELERY')
app.autodiscover_tasks()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment