Development of an internal social media platform with personalised dashboards for students
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.

celeryapp.py 548B

12345678910111213
  1. from __future__ import absolute_import
  2. import os
  3. from celery import Celery
  4. # set the default Django settings module for the 'celery' program.
  5. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'application.settings')
  6. from django.conf import settings
  7. app = Celery('application')
  8. # Using a string here means the worker don't have to serialize
  9. # the configuration object to child processes.
  10. app.config_from_object('django.conf:settings')
  11. # Load task modules from all registered Django app configs.
  12. app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)