0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-30 19:20:56 +01:00

Remove es_urls attribute from ElasticsearchBackend

This gets converted into es_hosts and es_urls isn't used at runtime
This commit is contained in:
Karl Hobley 2015-07-02 17:22:55 +01:00
parent 4c24e1a1ec
commit c329f7e6b5

View File

@ -313,15 +313,15 @@ class ElasticSearch(BaseSearch):
# Get settings
self.es_hosts = params.pop('HOSTS', None)
self.es_urls = params.pop('URLS', ['http://localhost:9200'])
self.es_index = params.pop('INDEX', 'wagtail')
self.es_timeout = params.pop('TIMEOUT', 10)
# If HOSTS is not set, convert URLS setting to HOSTS
es_urls = params.pop('URLS', ['http://localhost:9200'])
if self.es_hosts is None:
self.es_hosts = []
for url in self.es_urls:
for url in es_urls:
parsed_url = urlparse(url)
use_ssl = parsed_url.scheme == 'https'