jscheffl commented on code in PR #56875:
URL: https://github.com/apache/airflow/pull/56875#discussion_r2449411214


##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/utils/pod_manager.py:
##########
@@ -99,6 +101,92 @@ def check_exception_is_kubernetes_api_unauthorized(exc: 
BaseException):
     return isinstance(exc, ApiException) and exc.status and str(exc.status) == 
"401"
 
 
+async def generic_watch_pod_events(
+    self,
+    pod: V1Pod,
+    check_interval: float = 1,
+    is_async: bool = True,
+) -> None:
+    """Read pod events and writes into log."""
+    num_events = 0
+    while not self.stop_watching_events:
+        events = await self.read_pod_events(pod) if is_async else 
self.read_pod_events(pod)

Review Comment:
   Mhm, maybe I am an async-noob... it is the _SAME_ 
`read_pod_events()`function, how can it be sync or async depending on context?



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