You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
261 B

2 years ago
2 years ago
  1. import os
  2. from celery import Celery
  3. os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.production")
  4. app = Celery("config")
  5. app.config_from_object("django.conf:settings", namespace="CELERY")
  6. app.autodiscover_tasks(related_name="celery_tasks")