Last active
April 28, 2017 04:28
-
-
Save laughingman7743/870da71a76386c0cc9c1d18aec0fdb7a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 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() | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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