Commit 8699bfe4 by Guba Sándor

vmcelery: updated to cache backend

parent 0cc1f1e3
......@@ -7,6 +7,7 @@ from os import getenv
HOSTNAME = gethostname()
AMQP_URI = getenv('AMQP_URI')
CACHE_URI = getenv('CACHE_URI')
def to_bool(value):
......@@ -14,17 +15,17 @@ def to_bool(value):
lib_connection = None
celery = Celery('vmcelery', backend='amqp',
celery = Celery('vmcelery',
broker=AMQP_URI,
include=['vmdriver'])
celery.conf.update(
CELERY_RESULT_BACKEND='cache',
CELERY_CACHE_BACKEND=CACHE_URI,
CELERY_TASK_RESULT_EXPIRES=300,
CELERY_QUEUES=(
Queue(HOSTNAME + '.vm', Exchange(
'vmdriver', type='direct'), routing_key="vmdriver"),
# Queue(HOSTNAME + '.monitor', Exchange(
# 'monitor', type='direct'), routing_key="monitor"),
)
)
......
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