kaxil commented on a change in pull request #10956:
URL: https://github.com/apache/airflow/pull/10956#discussion_r500096812
##########
File path: airflow/jobs/scheduler_job.py
##########
@@ -556,12 +556,15 @@ def execute_callbacks(
:param session: DB session.
"""
for request in callback_requests:
- if isinstance(request, TaskCallbackRequest):
- self._execute_task_callbacks(dagbag, request)
- elif isinstance(request, SlaCallbackRequest):
- self.manage_slas(dagbag.dags.get(request.dag_id))
- elif isinstance(request, DagCallbackRequest):
- self._execute_dag_callbacks(dagbag, request, session)
+ try:
+ if isinstance(request, TaskCallbackRequest):
+ self._execute_task_callbacks(dagbag, request)
+ elif isinstance(request, SlaCallbackRequest):
+ self.manage_slas(dagbag.dags.get(request.dag_id))
Review comment:
I think `manage_slas` is fine being public since you can run perform
some actions and tests outside of the Scheduler too. The only reason it is not
a static method is because we use self.log
----------------------------------------------------------------
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]