Skip to content

Commit

Permalink
Added rabbit-mq support #10
Browse files Browse the repository at this point in the history
  • Loading branch information
Scisco committed Dec 2, 2014
1 parent 52abb7f commit 19211fb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Procfile
@@ -1,2 +1,2 @@
web: gunicorn --pythonpath="$PWD/pillbox-engine" wsgi:application
worker: celery worker --app=pillbox-engine._celery -B --loglevel=info --concurrency=1
worker: celery worker --app=pillbox-engine._celery -B --loglevel=DEBUG --concurrency=1
18 changes: 13 additions & 5 deletions pillbox-engine/config/common.py
Expand Up @@ -241,8 +241,16 @@ class Common(Configuration):
SPL_RAW_DATA = '/Users/ajdevseed/lib/repos/devseed/pillbox_engine_copy/tmp-unzipped'

# Celery settings
BROKER_URL = 'django://'
# CELERY_RESULT_BACKEND = 'db+sqlite:///%s' % join(BASE_DIR, 'db/results.sqlite3')
CELERY_RESULT_BACKEND = 'djcelery_pillbox.database:DatabaseBackend'
CELERY_ACCEPT_CONTENT = ['pickle']
CELERY_DISABLE_RATE_LIMITS = True

BROKER_URL = values.Value('django://')
CELERY_RESULT_BACKEND = values.Value('djcelery_pillbox.database:DatabaseBackend')
CELERY_TASK_RESULT_EXPIRES = values.IntegerValue(3600)
CELERY_DISABLE_RATE_LIMITS = values.BooleanValue(True)
CELERYD_CONCURRENCY = values.IntegerValue(1)
CELERY_ACCEPT_CONTENT = values.ListValue(['json', 'msgpack', 'yaml'])
CELERY_TASK_SERIALIZER = values.Value('json')
CELERY_RESULT_SERIALIZER = values.Value('json')
CELERY_TRACK_STARTED = values.BooleanValue(True)
CELERYD_TASK_TIME_LIMIT = values.IntegerValue(3600)

# CELERY_ALWAYS_EAGER
2 changes: 2 additions & 0 deletions pillbox-engine/config/local.py
Expand Up @@ -36,3 +36,5 @@ class Local(Common):
# end django-debug-toolbar

# Your local stuff: Below this line define 3rd party libary settings
BROKER_URL = 'amqp://localhost'
CELERY_RESULT_BACKEND = 'amqp'
2 changes: 2 additions & 0 deletions pillbox-engine/config/production.py
Expand Up @@ -29,3 +29,5 @@ class Production(Common):
INSTALLED_APPS += ("gunicorn", )

# Your production stuff: Below this line define 3rd party libary settings
BROKER_URL = 'amqp://localhost'
CELERY_RESULT_BACKEND = 'amqp'

0 comments on commit 19211fb

Please sign in to comment.