Commit d4bbe15b by Bach Dániel

Merge branch 'feature-fix-celery' into 'master'

Feature fix celery

See merge request !8
parents 1f336e7d 68cc93e8
...@@ -46,7 +46,6 @@ Set up default Storage configuration and activate the virtual environment:: ...@@ -46,7 +46,6 @@ Set up default Storage configuration and activate the virtual environment::
$ cat >>/home/cloud/.virtualenvs/storage/bin/postactivate <<END $ cat >>/home/cloud/.virtualenvs/storage/bin/postactivate <<END
export AMQP_URI='amqp://cloud:password@host:5672/circle' export AMQP_URI='amqp://cloud:password@host:5672/circle'
export CACHE_URI='pylibmc://$(hostname):11211/'
END END
$ workon storage $ workon storage
$ cd ~/storagedriver $ cd ~/storagedriver
......
celery==3.0.23 celery==3.1.17
requests==2.2.1 requests==2.5.3
pylibmc==1.2.3
filemagic==1.6 filemagic==1.6
...@@ -16,15 +16,13 @@ if HOSTNAME is None: ...@@ -16,15 +16,13 @@ if HOSTNAME is None:
"Hostname format must be hostname.module.priority.") "Hostname format must be hostname.module.priority.")
AMQP_URI = getenv('AMQP_URI') AMQP_URI = getenv('AMQP_URI')
CACHE_URI = getenv('CACHE_URI')
celery = Celery('storagedriver', celery = Celery('storagedriver',
broker=AMQP_URI, broker=AMQP_URI,
include=['storagedriver']) include=['storagedriver'])
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, Exchange( Queue(HOSTNAME, 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