You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2023/08/17 04:55:56 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #33424: Create a new method used to resume the task in order to implement specific logic for operators

uranusjr commented on code in PR #33424:
URL: https://github.com/apache/airflow/pull/33424#discussion_r1296673755


##########
airflow/sensors/base.py:
##########
@@ -281,6 +282,16 @@ def run_duration() -> float:
         self.log.info("Success criteria met. Exiting.")
         return xcom_value
 
+    def resume_execution(self, next_method: str, next_kwargs: dict[str, Any] | None, context: Context):
+        try:
+            return super().resume_execution(next_method, next_kwargs, context)
+        except (AirflowException, TaskDeferralError) as e:
+            if self.soft_fail:
+                raise AirflowSkipException(e)

Review Comment:
   Do we need to cast the (wrapped) exception to a str first?



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