Skip to content

Commit

Permalink
update225822582258$
Browse files Browse the repository at this point in the history
Signed-off-by: Sai Medhini Reddy Maryada <[email protected]>
  • Loading branch information
Sai Medhini Reddy Maryada authored and Sai Medhini Reddy Maryada committed Dec 27, 2023
1 parent b115caf commit 1b4f5b8
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions osbenchmark/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,13 +363,8 @@ async def on_request_end(session, trace_config_ctx, params):

class BenchmarkAsyncOpenSearch(opensearchpy.AsyncOpenSearch, RequestContextHolder):
print("benchmark###################")
async def __aenter__(self):
print("enter###############")
return self

async def __aexit__(self, *_):
print("exit###############")
await self.close()
async def __init__(self):
print("benchmark__init__###################")
#pass

if "amazon_aws_log_in" not in self.client_options:
Expand All @@ -383,6 +378,7 @@ async def __aexit__(self, *_):
token=self.aws_log_in_dict["aws_session_token"])
aws_auth = opensearchpy.AWSV4SignerAsyncAuth(credentials, self.aws_log_in_dict["region"],
self.aws_log_in_dict["service"])

return BenchmarkAsyncOpenSearch(hosts=self.hosts,
connection_class=osbenchmark.async_connection.AsyncHttpConnection,
use_ssl=True, verify_certs=True, http_auth=aws_auth,
Expand Down

0 comments on commit 1b4f5b8

Please sign in to comment.