Skip to content

Instantly share code, notes, and snippets.

@laughingman7743
Last active April 28, 2017 04:28
Show Gist options
  • Save laughingman7743/870da71a76386c0cc9c1d18aec0fdb7a to your computer and use it in GitHub Desktop.
Save laughingman7743/870da71a76386c0cc9c1d18aec0fdb7a to your computer and use it in GitHub Desktop.
--- a/usr/local/lib/python2.7/site-packages/airflow/jobs.py
+++ b/usr/local/lib/python2.7/site-packages/airflow/jobs.py
@@ -35,7 +35,7 @@ import time
from time import sleep
import psutil
-from sqlalchemy import Column, Integer, String, DateTime, func, Index, or_
+from sqlalchemy import Column, Integer, String, DateTime, func, Index, or_, and_
from sqlalchemy.exc import OperationalError
from sqlalchemy.orm.session import make_transient
from tabulate import tabulate
@@ -606,8 +606,8 @@ class SchedulerJob(BaseJob):
slas = (
session
.query(SlaMiss)
- .filter(or_(SlaMiss.email_sent == False,
- SlaMiss.notification_sent == False))
+ .filter(and_(SlaMiss.email_sent == False,
+ SlaMiss.notification_sent == False))
.filter(SlaMiss.dag_id == dag.dag_id)
.all()
)
#!/bin/bash
patch -u airflow/jobs.py < AIRFLOW_988.diff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment