celery.py 303 B

12345678910
  1. from __future__ import absolute_import
  2. import os
  3. from celery import Celery
  4. from django.conf import settings
  5. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'upload.settings')
  6. app = Celery('upload')
  7. app.config_from_object('django.conf.settings')
  8. app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)