Skip to content

Instantly share code, notes, and snippets.

@channeng
Created October 22, 2017 16:10
Show Gist options
  • Select an option

  • Save channeng/54cf295445c8e58a7ff9f326bf0a2b19 to your computer and use it in GitHub Desktop.

Select an option

Save channeng/54cf295445c8e58a7ff9f326bf0a2b19 to your computer and use it in GitHub Desktop.
Celery Flask setup -- config
from os import environ
REDIS_HOST = "0.0.0.0"
REDIS_PORT = 6379
BROKER_URL = environ.get('REDIS_URL', "redis://{host}:{port}/0".format(
host=REDIS_HOST, port=str(REDIS_PORT)))
CELERY_RESULT_BACKEND = BROKER_URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment