Skip to content

Commit

Permalink
Fix Celery settings for Heroku
Browse files Browse the repository at this point in the history
  • Loading branch information
bfirsh committed Nov 5, 2018
1 parent 3b021ba commit 7c1cb0f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion modernomad/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,18 @@
CELERY_RESULT_SERIALIZER = 'json'
CELERY_ENABLE_UTC = True
CELERY_ACCEPT_CONTENT = ['json', 'yaml']
CELERY_RESULT_BACKEND = BROKER_URL

# Disabled when moving to Heroku for simplicity's sake, because no tasks
# have results. If results are needed, a suitable one can be picked for
# Heroku + CloudAMPQ. (Probably the "rpc" one, perhaps Django ORM?)
CELERY_RESULT_BACKEND = None

# as per https://www.cloudamqp.com/docs/celery.html
BROKER_POOL_LIMIT = 1
BROKER_HEARTBEAT = None
BROKER_CONNECTION_TIMEOUT = 30
CELERY_EVENT_QUEUE_EXPIRES = 60
CELERYD_PREFETCH_MULTIPLIER = 1

REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': [
Expand Down

0 comments on commit 7c1cb0f

Please sign in to comment.