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



##########
File path: airflow/jobs/local_task_job.py
##########
@@ -162,11 +162,7 @@ def heartbeat_callback(self, session=None):
                 "Terminating instance.",
                 ti.state
             )
-            if ti.state == State.FAILED and ti.task.on_failure_callback:
-                context = ti.get_template_context()
-                ti.task.on_failure_callback(context)
-            if ti.state == State.SUCCESS and ti.task.on_success_callback:
-                context = ti.get_template_context()
-                ti.task.on_success_callback(context)

Review comment:
       In case of success, do I correctly understand that now 
`task.on_success_callback` will be executed only in `_run_raw_task` via 
`_run_success_callback`?




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