houqp commented on a change in pull request #10917:
URL: https://github.com/apache/airflow/pull/10917#discussion_r488061688
##########
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:
that's correct, callbacks should only be executed within _run_raw_task
to avoid race condiitions.
----------------------------------------------------------------
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]