Skip to content

Instantly share code, notes, and snippets.

@ma1onso
Created January 14, 2016 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ma1onso/e0cc2988525bb0582df4 to your computer and use it in GitHub Desktop.
Save ma1onso/e0cc2988525bb0582df4 to your computer and use it in GitHub Desktop.
Celery and Redis config in Django settings.py
# Celery
BROKER_URL = "redis://127.0.0.1:6379/0"
CELERY_SEND_EVENTS = True
CELERY_RESULT_BACKEND = 'redis://127.0.0.1:6379/0'
# CELERY_TASK_RESULT_EXPIRES = 60
CELERY_ACCEPT_CONTENT = ['pickle', 'json', 'msgpack', 'yaml']
CELERY_IMPORTS = (
'another_module_with_task',
)
CELERYD_CONCURRENCY = 1
# Redis setup
REDIS_HOST = "127.0.0.1"
REDIS_PORT = 6379
REDIS_DB = 0
REDIS_CONNECT_RETRY = True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment