XD-DENG commented on a change in pull request #5065: [AIRFLOW-4261] Minor 
refactoring on jobs.py
URL: https://github.com/apache/airflow/pull/5065#discussion_r273067697
 
 

 ##########
 File path: airflow/jobs.py
 ##########
 @@ -665,8 +665,7 @@ def manage_slas(self, dag, session=None):
         slas = (
             session
             .query(SlaMiss)
-            .filter(SlaMiss.notification_sent == False)  # noqa: E712
-            .filter(SlaMiss.dag_id == dag.dag_id)
+            .filter(SlaMiss.notification_sent == False, SlaMiss.dag_id == 
dag.dag_id)  # noqa: E712
 
 Review comment:
   This change can bring minor performance improvement. 
   
   Benchmarking for this sort of change was done in 
https://github.com/apache/airflow/pull/4433

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to