Show More
@@ -100,7 +100,6 b' def main(global_config, **settings):' | |||||
100 | config.add_view_deriver('appenlight.predicates.csrf_view', |
|
100 | config.add_view_deriver('appenlight.predicates.csrf_view', | |
101 | name='csrf_view') |
|
101 | name='csrf_view') | |
102 |
|
102 | |||
103 |
|
||||
104 | # later, when config is available |
|
103 | # later, when config is available | |
105 | dogpile_config = {'url': settings['redis.url'], |
|
104 | dogpile_config = {'url': settings['redis.url'], | |
106 | "redis_expiration_time": 86400, |
|
105 | "redis_expiration_time": 86400, | |
@@ -130,10 +129,12 b' def main(global_config, **settings):' | |||||
130 | config.include('pyramid_jinja2') |
|
129 | config.include('pyramid_jinja2') | |
131 | config.include('appenlight_client.ext.pyramid_tween') |
|
130 | config.include('appenlight_client.ext.pyramid_tween') | |
132 | config.include('ziggurat_foundations.ext.pyramid.sign_in') |
|
131 | config.include('ziggurat_foundations.ext.pyramid.sign_in') | |
133 | config.registry.es_conn = pyelasticsearch.ElasticSearch( |
|
132 | es_server_list = aslist(settings['elasticsearch.nodes']) | |
134 | aslist(settings['elasticsearch.nodes'])) |
|
133 | redis_url = settings['redis.url'] | |
135 | config.registry.redis_conn = redis.StrictRedis.from_url( |
|
134 | log.info('Elasticsearch server list: {}'.format(es_server_list)) | |
136 | settings['redis.url']) |
|
135 | log.info('Redis server: {}'.format(redis_url)) | |
|
136 | config.registry.es_conn = pyelasticsearch.ElasticSearch(es_server_list) | |||
|
137 | config.registry.redis_conn = redis.StrictRedis.from_url(redis_url) | |||
137 |
|
138 | |||
138 | config.registry.redis_lockmgr = Redlock([settings['redis.redlock.url'], ], |
|
139 | config.registry.redis_lockmgr = Redlock([settings['redis.redlock.url'], ], | |
139 | retry_count=0, retry_delay=0) |
|
140 | retry_count=0, retry_delay=0) |
General Comments 0
You need to be logged in to leave comments.
Login now