Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds ELASTICSEARCH_TIMEOUT to all search clients #560

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pgsync/search_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ def get_search_client(
use_ssl=True,
verify_certs=True,
connection_class=connection_class,
timeout=settings.ELASTICSEARCH_TIMEOUT,
)
elif settings.ELASTICSEARCH:
return client(
Expand All @@ -401,6 +402,7 @@ def get_search_client(
use_ssl=True,
verify_certs=True,
node_class=node_class,
timeout=settings.ELASTICSEARCH_TIMEOUT,
)
else:
hosts: t.List[str] = [url]
Expand Down Expand Up @@ -436,8 +438,6 @@ def get_search_client(
ssl_version: t.Optional[int] = settings.ELASTICSEARCH_SSL_VERSION
ssl_context: t.Optional[t.Any] = settings.ELASTICSEARCH_SSL_CONTEXT
ssl_show_warn: bool = settings.ELASTICSEARCH_SSL_SHOW_WARN
# Transport
timeout: float = settings.ELASTICSEARCH_TIMEOUT
return client(
hosts=hosts,
http_auth=http_auth,
Expand All @@ -457,5 +457,5 @@ def get_search_client(
ssl_context=ssl_context,
ssl_show_warn=ssl_show_warn,
# use_ssl=use_ssl,
timeout=timeout,
timeout=settings.ELASTICSEARCH_TIMEOUT,
)
Loading