Commit 701bc86f authored by Zachary Seguin's avatar Zachary Seguin

Configure redis only if REDIS_URL is set

parent ef346e2a
Pipeline #29 passed with stages
in 7 minutes and 2 seconds
......@@ -34,7 +34,10 @@ app.config.from_object('config')
db = SQLAlchemy(app)
redis = StrictRedis.from_url(app.config['REDIS_URL'], socket_timeout=app.config.get('REDIS_TIMEOUT', 20))
if not app.config['REDIS_URL'] is None:
redis = StrictRedis.from_url(app.config['REDIS_URL'], socket_timeout=app.config.get('REDIS_TIMEOUT', 20))
else:
redis = None
def make_celery(app):
celery = Celery(app.import_name)
......
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