Skip to content

Commit

Permalink
Simplified celery configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
nuwang committed Jun 18, 2016
1 parent 60d101d commit 28bfc28
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 40 deletions.
5 changes: 0 additions & 5 deletions django-cloudlaunch/cloudlaunch/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@
from __future__ import absolute_import

# This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from .celery import app as celery_app # noqa
28 changes: 0 additions & 28 deletions django-cloudlaunch/cloudlaunch/celery.py

This file was deleted.

2 changes: 0 additions & 2 deletions django-cloudlaunch/cloudlaunch/celeryconfig.py

This file was deleted.

11 changes: 6 additions & 5 deletions django-cloudlaunch/cloudlaunch/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


# Celery configuration
BROKER_URL = 'django://'
import djcelery
djcelery.setup_loader()
CELERY_RESULT_BACKEND='djcelery.backends.database:DatabaseBackend'

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/

Expand Down Expand Up @@ -61,7 +67,6 @@
# rest framework must come after baselaunch so templates can be overridden
'rest_framework',
'djcelery',
'kombu.transport.django' # must be last so all celery tasks are discovered
]

MIDDLEWARE_CLASSES = [
Expand Down Expand Up @@ -177,7 +182,3 @@
pass

# django-celery configuration

BROKER_URL = 'django://'
import djcelery
djcelery.setup_loader()

0 comments on commit 28bfc28

Please sign in to comment.