potiuk commented on code in PR #39371:
URL: https://github.com/apache/airflow/pull/39371#discussion_r1595379583
##########
airflow/providers/apache/beam/triggers/beam.py:
##########
@@ -233,6 +235,22 @@ async def run(self) -> AsyncIterator[TriggerEvent]: #
type: ignore[override]
if is_running:
await asyncio.sleep(self.poll_sleep)
try:
+ # Creating a new event loop to manage I/O operations asynchronously
Review Comment:
I am not sure (I am not that experienced in asyncio) if that one is
correct. the docs
https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.get_event_loop
suggest that if get_event_loop() is run in the coroutine, it will not create
a new event loop - it will return the current loop, and suggestion is to use
`get_running_loop` instead, so the comment is quite a bit misleading.
Can you explain what's the expected behaviour here please ?
--
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]