cruseakshay commented on code in PR #60650:
URL: https://github.com/apache/airflow/pull/60650#discussion_r2705646612


##########
providers/microsoft/azure/src/airflow/providers/microsoft/azure/triggers/data_factory.py:
##########
@@ -74,39 +74,40 @@ async def run(self) -> AsyncIterator[TriggerEvent]:
         hook = 
AzureDataFactoryAsyncHook(azure_data_factory_conn_id=self.azure_data_factory_conn_id)
         executed_after_token_refresh = False
         try:
-            while True:
-                try:
-                    pipeline_status = await hook.get_adf_pipeline_run_status(
-                        run_id=self.run_id,
-                        resource_group_name=self.resource_group_name,
-                        factory_name=self.factory_name,
-                    )
-                    executed_after_token_refresh = False
-                    if pipeline_status == 
AzureDataFactoryPipelineRunStatus.FAILED:
-                        yield TriggerEvent(
-                            {"status": "error", "message": f"Pipeline run 
{self.run_id} has Failed."}
+            async with hook:

Review Comment:
   Sure



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