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
1 changed files with 6 additions and 4 deletions

View File

@ -120,7 +120,8 @@ INSTALLED_APPS = (
'datacenterlight.templatetags',
'alplora',
'rest_framework',
'opennebula_api'
'opennebula_api',
'django_celery_results',
)
MIDDLEWARE_CLASSES = (
@ -522,9 +523,10 @@ 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'
# BROKER_URL = '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'