-
Notifications
You must be signed in to change notification settings - Fork 32
Timeout setting for Opensearch and Elasticsearch #408
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
Changes from 2 commits
4bac5b2
e212509
662f0bb
a7bb668
fb2c57f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,6 +53,10 @@ def _es_config() -> Dict[str, Any]: | |
|
|
||
| config["headers"] = headers | ||
|
|
||
| # Include timeout setting if set | ||
| if timeout := os.getenv("ES_TIMEOUT"): | ||
| config["timeout"] = timeout | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this right for Opensearch? I am not sure.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It should be, from OpenSearch Client parameters:
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for looking into this, I was going through the opensearch-py code a little and this makes sense for sure. |
||
|
|
||
| # Explicitly exclude SSL settings when not using SSL | ||
| if not use_ssl: | ||
| return config | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi. Nice addition. Should this be
request_timeout? https://www.elastic.co/guide/en/elasticsearch/client/python-api/8.18/config.html#timeoutsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, didn't notice the parameter was deprecated in Elasticsearch client, changed it