Commit 76c813f1 authored by Jed Simson's avatar Jed Simson

Use from_redis_url() instead of kwargs

parent 6e9f920e
import os
class Config(object):
DEBUG = False
SECRET_KEY = os.environ['SECRET_KEY']
class ProductionConfig(Config):
DEBUG = False
class DevelopmentConfig(Config):
DEVELOPMENT = True
DEBUG = True
......@@ -5,9 +5,7 @@ from main import app
import os
import redis
r = redis.StrictRedis(host=os.environ['REDIS_HOST'],
port=os.environ['REDIS_PORT'],
db=os.environ['REDIS_DB'])
r = redis.from_url(os.environ['REDIS_URL'])
manager = Manager(app.flask_app)
tasks = Manager(usage='Manage Celery tasks')
manager.add_command("tasks", tasks)
......
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 to comment