ashb commented on a change in pull request #10917:
URL: https://github.com/apache/airflow/pull/10917#discussion_r524559755



##########
File path: airflow/models/taskinstance.py
##########
@@ -1392,14 +1425,26 @@ def _handle_reschedule(self, actual_start_date, 
reschedule_exception, test_mode=
         self.log.info('Rescheduling task, marking task as UP_FOR_RESCHEDULE')
 
     @provide_session
-    def handle_failure(self, error, test_mode=None, context=None, 
force_fail=False, session=None):
+    def handle_failure(
+        self,
+        error: Union[str, Exception],
+        test_mode: Optional[bool] = None,
+        force_fail: bool = False,
+        error_file: Optional[str] = None,
+        session=None,
+    ) -> None:
         """Handle Failure for the TaskInstance"""
         if test_mode is None:
             test_mode = self.test_mode
-        if context is None:
-            context = self.get_template_context()
 
-        self.log.exception(error)
+        if error:
+            self.log.exception(error)
+            # external monitoring process provides pickel file so _run_raw_task

Review comment:
       ```suggestion
               # external monitoring process provides pickle file so 
_run_raw_task
   ```




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to