hussein-awala commented on code in PR #33976:
URL: https://github.com/apache/airflow/pull/33976#discussion_r1313579666


##########
airflow/providers/google/cloud/triggers/dataproc.py:
##########
@@ -277,12 +277,12 @@ async def run(self) -> AsyncIterator[TriggerEvent]:
                     self.polling_interval_seconds,
                 )
                 await asyncio.sleep(self.polling_interval_seconds)
-            except NotFound:
-                yield TriggerEvent({"status": "success", "message": ""})
-                return
-            except Exception as e:
-                yield TriggerEvent({"status": "error", "message": str(e)})
-                return
+        except NotFound:
+            yield TriggerEvent({"status": "success", "message": ""})
+            return
+        except Exception as e:
+            yield TriggerEvent({"status": "error", "message": str(e)})
+            return
         yield TriggerEvent({"status": "error", "message": "Timeout"})

Review Comment:
   Good idea, I kept the return statements to avoid yielding two events, but 
the suggested else could help.



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