define celery settings

This commit is contained in:
Robert Einsle 2017-02-11 19:23:59 +01:00
parent e84b2f54a9
commit 9a18080db9
2 changed files with 4 additions and 1 deletions

View File

@ -2,11 +2,12 @@ from __future__ import absolute_import, unicode_literals
import os import os
import django import django
from celery import Celery from celery import Celery
from django.conf import settings
# set the default Django settings module for the 'celery' program. # set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'caromserver.settings') os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'caromserver.settings')
app = Celery('caromserver') app = Celery(settings.CELERY_PREFIX)
# Using a string here means the worker don't have to serialize # Using a string here means the worker don't have to serialize
# the configuration object to child processes. # the configuration object to child processes.

View File

@ -162,6 +162,8 @@ URL_LOCATION_PROCESSOR = 'http://127.0.0.1:8000/billard/process_locationdata'
STATIC_ROOT = "/srv/carom/carom-server/static/" STATIC_ROOT = "/srv/carom/carom-server/static/"
CELERY_PREFIX = 'carom'
try: try:
from local_settings import * from local_settings import *
except ImportError: except ImportError: