# HG changeset patch # User Marcin Kuzminski # Date 2019-07-23 18:50:27 # Node ID 2bc3e4d7c81c71fb99691111ad1970a772a9ce0a # Parent 97e74c48cbac04699fe5d56546ecd428c1882be3 redis: fixed new redis url schema requirement for connection string diff --git a/rhodecode/config/middleware.py b/rhodecode/config/middleware.py --- a/rhodecode/config/middleware.py +++ b/rhodecode/config/middleware.py @@ -410,6 +410,12 @@ def sanitize_settings_and_apply_defaults "Using the following Mako template directories: %s", mako_directories) + # NOTE(marcink): fix redis requirement for schema of connection since 3.X + if 'beaker.session.type' in settings and settings['beaker.session.type'] == 'ext:redis': + raw_url = settings['beaker.session.url'] + if not raw_url.startswith(('redis://', 'rediss://', 'unix://')): + settings['beaker.session.url'] = 'redis://' + raw_url + # Default includes, possible to change as a user pyramid_includes = settings.setdefault('pyramid.includes', [ 'rhodecode.lib.middleware.request_wrapper',