You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/07/10 08:06:51 UTC
[GitHub] [airflow] turbaszek commented on a change in pull request #9750: invoke handleCallback on dag when manually deleting a DagRun from Airflow UI
turbaszek commented on a change in pull request #9750:
URL: https://github.com/apache/airflow/pull/9750#discussion_r452689426
##########
File path: airflow/www_rbac/views.py
##########
@@ -2528,12 +2528,22 @@ class DagRunModelView(AirflowModelView):
'run_id': wwwutils.dag_run_link,
}
+ @staticmethod
+ def notify(items, session):
+ for item in items:
+ dag_run = session.query(DagRun).filter(
+ DagRun.dag_id == item.dag_id,
+ DagRun.execution_date == item.execution_date
+ ).one()
+ dagbag.get_dag(item.dag_id).handle_callback(dag_run, success=False, reason='deleted', session=session)
Review comment:
Can we get the result using a single query?
----------------------------------------------------------------
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:
users@infra.apache.org