Skip to content

Commit

Permalink
fix(microsoft/azure): add return statement to yield within a while lo…
Browse files Browse the repository at this point in the history
…op in triggers (#38393)
  • Loading branch information
Lee-W committed Mar 22, 2024
1 parent cddf1cc commit 51c94e1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions airflow/providers/microsoft/azure/triggers/wasb.py
Expand Up @@ -78,6 +78,7 @@ async def run(self) -> AsyncIterator[TriggerEvent]:
if blob_exists:
message = f"Blob {self.blob_name} found in container {self.container_name}."
yield TriggerEvent({"status": "success", "message": message})
return
else:
message = (
f"Blob {self.blob_name} not available yet in container {self.container_name}."
Expand Down Expand Up @@ -154,6 +155,7 @@ async def run(self) -> AsyncIterator[TriggerEvent]:
if prefix_exists:
message = f"Prefix {self.prefix} found in container {self.container_name}."
yield TriggerEvent({"status": "success", "message": message})
return
else:
message = (
f"Prefix {self.prefix} not available yet in container {self.container_name}."
Expand Down

0 comments on commit 51c94e1

Please sign in to comment.