VladaZakharova commented on code in PR #67638:
URL: https://github.com/apache/airflow/pull/67638#discussion_r3339707899


##########
providers/google/src/airflow/providers/google/cloud/triggers/dataproc.py:
##########
@@ -594,8 +594,11 @@ def serialize(self) -> tuple[str, dict[str, Any]]:
         )
 
     async def run(self):
+        hook = self.get_async_hook()
+        await hook.get_batch_client(region=self.region)

Review Comment:
   Good point. 
   The important part of the fix is that `DataprocBatchTrigger.run()` now 
creates the async hook once and reuses that same hook during polling. With the 
cached batch client, the first `get_batch()` initializes the client and later 
polls reuse it.
   
   



-- 
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]

Reply via email to