From 1a01963bac5f48dccd6de8100e6ec7b9c0673581 Mon Sep 17 00:00:00 2001 From: Sai Medhini Reddy Maryada Date: Wed, 27 Dec 2023 01:56:36 -0800 Subject: [PATCH] update225822582258$ Signed-off-by: Sai Medhini Reddy Maryada --- osbenchmark/client.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/osbenchmark/client.py b/osbenchmark/client.py index 19abfe35..e1d71001 100644 --- a/osbenchmark/client.py +++ b/osbenchmark/client.py @@ -362,7 +362,15 @@ async def on_request_end(session, trace_config_ctx, params): self.client_options["trace_config"] = trace_config class BenchmarkAsyncOpenSearch(opensearchpy.AsyncOpenSearch, RequestContextHolder): - pass + print("benchmark###################") + async def __aenter__(self) -> Any: + print("enter###############") + return self + + async def __aexit__(self, *_: Any) -> None: + print("exit###############") + await self.close() + #pass if "amazon_aws_log_in" not in self.client_options: return BenchmarkAsyncOpenSearch(hosts=self.hosts,