Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 76C4D200C59 for ; Mon, 13 Mar 2017 03:49:14 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 75963160B77; Mon, 13 Mar 2017 02:49:14 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C5E03160B87 for ; Mon, 13 Mar 2017 03:49:13 +0100 (CET) Received: (qmail 96468 invoked by uid 500); 13 Mar 2017 02:49:13 -0000 Mailing-List: contact commits-help@airflow.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airflow.incubator.apache.org Delivered-To: mailing list commits@airflow.incubator.apache.org Received: (qmail 96409 invoked by uid 99); 13 Mar 2017 02:49:12 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Mar 2017 02:49:12 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 09D74182132 for ; Mon, 13 Mar 2017 02:49:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.569 X-Spam-Level: X-Spam-Status: No, score=-3.569 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_NEUTRAL=0.652] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 9JA4WrNY5AYL for ; Mon, 13 Mar 2017 02:49:11 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 5DD7F5FDF4 for ; Mon, 13 Mar 2017 02:49:08 +0000 (UTC) Received: (qmail 93537 invoked by uid 99); 13 Mar 2017 02:49:07 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Mar 2017 02:49:07 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id BEBB5DFF13; Mon, 13 Mar 2017 02:49:05 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bolke@apache.org To: commits@airflow.incubator.apache.org Date: Mon, 13 Mar 2017 02:49:19 -0000 Message-Id: <1fa6366e155a4d79bbf57dbdb61a21c3@git.apache.org> In-Reply-To: <59d824161e684a3698d19a08f5a12580@git.apache.org> References: <59d824161e684a3698d19a08f5a12580@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [15/28] incubator-airflow git commit: [AIRFLOW-938] Use test for True in task_stats queries archived-at: Mon, 13 Mar 2017 02:49:14 -0000 [AIRFLOW-938] Use test for True in task_stats queries Fix a bug with the task_stats query on postgres which doesn't support == 1. https://issues.apache.org/jira/browse/AIRFLOW-938 I've seen the other PR but I'll try to see if this method works because I believe `__eq__(True)` is just `== True`, and it is how it is down here http ://docs.sqlalchemy.org/en/latest/core/sqlelement.h tml#sqlalchemy.sql.expression.and_ (underscore is part of link) Closes #2123 from saguziel/aguziel-fix-task- stats-2 Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/157054e2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/157054e2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/157054e2 Branch: refs/heads/v1-8-test Commit: 157054e2c9967e48fb3f3157081baf686dcee5e8 Parents: 66f39ca Author: Alex Guziel Authored: Fri Mar 3 13:52:03 2017 -0800 Committer: Bolke de Bruin Committed: Sun Mar 12 08:21:23 2017 -0700 ---------------------------------------------------------------------- airflow/www/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/157054e2/airflow/www/views.py ---------------------------------------------------------------------- diff --git a/airflow/www/views.py b/airflow/www/views.py index d1a1f9a..962c1f0 100644 --- a/airflow/www/views.py +++ b/airflow/www/views.py @@ -506,7 +506,7 @@ class Airflow(BaseView): session.query(DagRun.dag_id, sqla.func.max(DagRun.execution_date).label('execution_date')) .join(Dag, Dag.dag_id == DagRun.dag_id) .filter(DagRun.state != State.RUNNING) - .filter(Dag.is_active == 1) + .filter(Dag.is_active == True) .group_by(DagRun.dag_id) .subquery('last_dag_run') ) @@ -514,7 +514,7 @@ class Airflow(BaseView): session.query(DagRun.dag_id, DagRun.execution_date) .join(Dag, Dag.dag_id == DagRun.dag_id) .filter(DagRun.state == State.RUNNING) - .filter(Dag.is_active == 1) + .filter(Dag.is_active == True) .subquery('running_dag_run') )