Programmer-RD-AI commented on code in PR #53454:
URL: https://github.com/apache/airflow/pull/53454#discussion_r2217699395
##########
providers/amazon/src/airflow/providers/amazon/aws/triggers/base.py:
##########
@@ -142,7 +144,12 @@ def hook(self) -> AwsGenericHook:
async def run(self) -> AsyncIterator[TriggerEvent]:
hook = self.hook()
- async with await hook.get_async_conn() as client:
+
+ if AwsBaseWaiterTrigger._shared_client is None:
+ AwsBaseWaiterTrigger._shared_client = await hook.get_async_conn()
+ client = AwsBaseWaiterTrigger._shared_client
Review Comment:
we need the `hook` to get the client, that is why we are doing it there it
self, i suppose we could move it a separate function but i think that
excessive, if we want to I could, let me know, thanks :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]