You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Adaverse (via GitHub)" <gi...@apache.org> on 2023/07/04 06:10:54 UTC
[GitHub] [airflow] Adaverse commented on a diff in pull request #32323: refresh connection if an exception is caught in "AzureDataFactory"
Adaverse commented on code in PR #32323:
URL: https://github.com/apache/airflow/pull/32323#discussion_r1251529709
##########
airflow/providers/microsoft/azure/hooks/data_factory.py:
##########
@@ -828,7 +834,14 @@ def wait_for_pipeline_run_status(
# Wait to check the status of the pipeline run based on the ``check_interval`` configured.
time.sleep(check_interval)
- pipeline_run_status = self.get_pipeline_run_status(**pipeline_run_info)
+ try:
+ pipeline_run_status = self.get_pipeline_run_status(**pipeline_run_info)
+ executed_after_token_refresh = True
+ except ServiceRequestError:
+ if executed_after_token_refresh:
+ self.refresh_conn()
+ continue
+ raise
Review Comment:
Do we need `raise` here?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org