Added django-celery-results and setup redis as backend for celery tasks

This commit is contained in:
M.Ravi 2017-08-06 16:32:27 +02:00
parent 477c8e81a4
commit 68505e73a8

View file

@ -120,7 +120,8 @@ INSTALLED_APPS = (
'datacenterlight.templatetags',
'alplora',
'rest_framework',
'opennebula_api'
'opennebula_api',
'django_celery_results',
)
MIDDLEWARE_CLASSES = (
@ -523,8 +524,9 @@ GOOGLE_ANALYTICS_PROPERTY_IDS = {
# CELERY Settings
# BROKER_URL = 'redis://localhost:6379'
BROKER_URL = 'redis+socket:///var/run/redis/redis.sock'
CELERY_RESULT_BACKEND = 'redis://localhost:6379'
CELERY_BROKER_URL = 'redis+socket:///tmp/redis.sock'
# CELERY_RESULT_BACKEND = 'redis://localhost:6379'
CELERY_RESULT_BACKEND = 'redis+socket:///tmp/redis.sock'
CELERY_ACCEPT_CONTENT = ['application/json']
CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER = 'json'