Skip to content
Advertisement

How to specify timeout on aws opensearch library for python

I am using https://opensearch.org/docs/latest/clients/python/ to interact with an opensearch instance

JavaScript

but I need somehow to to extend the lifetime of the request easily. I searched the docs and I couldn’t find a timeout parameter.

Is there a way to specify a timeout?

Advertisement

Answer

You can pass timeout=60 (or whatever) to the OpenSearch object when you create it. This gets passed to the underline connection object.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement