Commit 86a1b71c by Guba Sándor

updated to cache backend

parent 55ad9722
...@@ -4,13 +4,15 @@ from socket import gethostname ...@@ -4,13 +4,15 @@ from socket import gethostname
from os import getenv from os import getenv
HOSTNAME = gethostname() HOSTNAME = gethostname()
AMQP_URI = getenv('AMQP_URI') AMQP_URI = getenv('AMQP_URI')
CACHE_URI = getenv('CACHE_URI')
celery = Celery('storagedriver',
celery = Celery('storagedriver', backend='amqp',
broker=AMQP_URI, broker=AMQP_URI,
include=['storagedriver']) include=['storagedriver'])
celery.conf.update( celery.conf.update(
CELERY_RESULT_BACKEND='cache',
CELERY_CACHE_BACKEND=CACHE_URI,
CELERY_TASK_RESULT_EXPIRES=300, CELERY_TASK_RESULT_EXPIRES=300,
CELERY_QUEUES=( CELERY_QUEUES=(
Queue(HOSTNAME + '.storage', Exchange( Queue(HOSTNAME + '.storage', Exchange(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment