remove celery from project
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
# 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
|
||||
|
||||
__all__ = ['celery_app']
|
||||
|
@@ -1,28 +0,0 @@
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
import os
|
||||
import django
|
||||
from celery import Celery
|
||||
from django.conf import settings
|
||||
|
||||
# set the default Django settings module for the 'celery' program.
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'caromserver.settings')
|
||||
|
||||
app = Celery(settings.CELERY_PREFIX)
|
||||
|
||||
# Using a string here means the worker don't have to serialize
|
||||
# the configuration object to child processes.
|
||||
# - namespace='CELERY' means all celery-related configuration keys
|
||||
# should have a `CELERY_` prefix.
|
||||
app.config_from_object('django.conf:settings')
|
||||
|
||||
# Load task modules from all registered Django app configs.
|
||||
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "caromserver.settings")
|
||||
django.setup()
|
||||
|
||||
app.autodiscover_tasks(['billard'])
|
||||
|
||||
|
||||
@app.task(bind=True)
|
||||
def debug_task(self):
|
||||
print('Request: {0!r}'.format(self.request))
|
@@ -138,14 +138,6 @@ LOGOUT_URL = 'logout'
|
||||
LOGIN_REDIRECT_URL = 'billard:location_index'
|
||||
LOGOUT_REDIRECT_URL = 'billard:location_index'
|
||||
|
||||
# CELERY STUFF
|
||||
BROKER_URL = 'redis://localhost:6379'
|
||||
CELERY_RESULT_BACKEND = 'redis://localhost:6379'
|
||||
CELERY_ACCEPT_CONTENT = ['application/json']
|
||||
CELERY_TASK_SERIALIZER = 'json'
|
||||
CELERY_RESULT_SERIALIZER = 'json'
|
||||
CELERY_TIMEZONE = 'Europe/Berlin'
|
||||
|
||||
# Admin eMails
|
||||
ADMINS = (
|
||||
('Robert Einsle', 'robert@einsle.de'),
|
||||
@@ -162,8 +154,6 @@ URL_LOCATION_PROCESSOR = 'http://127.0.0.1:8000/billard/process_locationdata'
|
||||
|
||||
STATIC_ROOT = "/srv/carom/carom-server/static/"
|
||||
|
||||
CELERY_PREFIX = 'carom'
|
||||
|
||||
try:
|
||||
from local_settings import *
|
||||
except ImportError:
|
||||
|
Reference in New Issue
Block a user