ashb commented on code in PR #45294:
URL: https://github.com/apache/airflow/pull/45294#discussion_r1924049855


##########
task_sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -535,10 +556,16 @@ def run(ti: RuntimeTaskInstance, log: Logger):
             state=TerminalTIState.FAILED,
             end_date=datetime.now(tz=timezone.utc),
         )
+        get_listener_manager().hook.on_task_instance_failed(
+            previous_state=TaskInstanceState.RUNNING, task_instance=ti
+        )
         # TODO: Run task failure callbacks here
     except BaseException:
         log.exception("Task failed with exception")
         # TODO: Run task failure callbacks here
+        get_listener_manager().hook.on_task_instance_failed(
+            previous_state=TaskInstanceState.RUNNING, task_instance=ti
+        )

Review Comment:
   Yeah listeners, certainly post-execute ones in finalize please.



-- 
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: [email protected]

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

Reply via email to