Commit 31e4886b by Bach Dániel

manager: change celery result backend

Closes #380
parent 72024042
...@@ -22,7 +22,6 @@ from kombu import Queue, Exchange ...@@ -22,7 +22,6 @@ from kombu import Queue, Exchange
from os import getenv from os import getenv
HOSTNAME = "localhost" HOSTNAME = "localhost"
CACHE_URI = getenv("CACHE_URI", "pylibmc://127.0.0.1:11211/")
QUEUE_NAME = HOSTNAME + '.man' QUEUE_NAME = HOSTNAME + '.man'
...@@ -38,8 +37,7 @@ celery = Celery('manager', ...@@ -38,8 +37,7 @@ celery = Celery('manager',
]) ])
celery.conf.update( celery.conf.update(
CELERY_RESULT_BACKEND='cache', CELERY_RESULT_BACKEND='amqp',
CELERY_CACHE_BACKEND=CACHE_URI,
CELERY_TASK_RESULT_EXPIRES=300, CELERY_TASK_RESULT_EXPIRES=300,
CELERY_QUEUES=( CELERY_QUEUES=(
Queue(HOSTNAME + '.man', Exchange('manager', type='direct'), Queue(HOSTNAME + '.man', Exchange('manager', type='direct'),
......
...@@ -22,7 +22,6 @@ from kombu import Queue, Exchange ...@@ -22,7 +22,6 @@ from kombu import Queue, Exchange
from os import getenv from os import getenv
HOSTNAME = "localhost" HOSTNAME = "localhost"
CACHE_URI = getenv("CACHE_URI", "pylibmc://127.0.0.1:11211/")
QUEUE_NAME = HOSTNAME + '.monitor' QUEUE_NAME = HOSTNAME + '.monitor'
celery = Celery('monitor', celery = Celery('monitor',
...@@ -32,8 +31,7 @@ celery = Celery('monitor', ...@@ -32,8 +31,7 @@ celery = Celery('monitor',
]) ])
celery.conf.update( celery.conf.update(
CELERY_RESULT_BACKEND='cache', CELERY_RESULT_BACKEND='amqp',
CELERY_CACHE_BACKEND=CACHE_URI,
CELERY_TASK_RESULT_EXPIRES=300, CELERY_TASK_RESULT_EXPIRES=300,
CELERY_QUEUES=( CELERY_QUEUES=(
Queue(QUEUE_NAME, Exchange('monitor', type='direct'), Queue(QUEUE_NAME, Exchange('monitor', type='direct'),
......
...@@ -22,7 +22,6 @@ from kombu import Queue, Exchange ...@@ -22,7 +22,6 @@ from kombu import Queue, Exchange
from os import getenv from os import getenv
HOSTNAME = "localhost" HOSTNAME = "localhost"
CACHE_URI = getenv("CACHE_URI", "pylibmc://127.0.0.1:11211/")
QUEUE_NAME = HOSTNAME + '.man.slow' QUEUE_NAME = HOSTNAME + '.man.slow'
celery = Celery('manager.slow', celery = Celery('manager.slow',
...@@ -34,8 +33,7 @@ celery = Celery('manager.slow', ...@@ -34,8 +33,7 @@ celery = Celery('manager.slow',
]) ])
celery.conf.update( celery.conf.update(
CELERY_RESULT_BACKEND='cache', CELERY_RESULT_BACKEND='amqp',
CELERY_CACHE_BACKEND=CACHE_URI,
CELERY_TASK_RESULT_EXPIRES=300, CELERY_TASK_RESULT_EXPIRES=300,
CELERY_QUEUES=( CELERY_QUEUES=(
Queue(QUEUE_NAME, Exchange('manager.slow', type='direct'), Queue(QUEUE_NAME, Exchange('manager.slow', type='direct'),
......
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