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 25B0B200C06 for ; Fri, 27 Jan 2017 11:44:40 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 2447A160B5B; Fri, 27 Jan 2017 10:44:40 +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 6CEF6160B47 for ; Fri, 27 Jan 2017 11:44:39 +0100 (CET) Received: (qmail 63919 invoked by uid 500); 27 Jan 2017 10:44:38 -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 63910 invoked by uid 99); 27 Jan 2017 10:44:38 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jan 2017 10:44:38 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 23DDAC1A4F for ; Fri, 27 Jan 2017 10:44:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -6.219 X-Spam-Level: X-Spam-Status: No, score=-6.219 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Gp6gWnC4QqgJ for ; Fri, 27 Jan 2017 10:44:37 +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 0CF045F30B for ; Fri, 27 Jan 2017 10:44:36 +0000 (UTC) Received: (qmail 63900 invoked by uid 99); 27 Jan 2017 10:44:36 -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; Fri, 27 Jan 2017 10:44:36 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 39987DFBDB; Fri, 27 Jan 2017 10:44:36 +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 Message-Id: <0cb38a3b7c224f65889b8214b1628179@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: incubator-airflow git commit: [AIRFLOW-812] Fix the scheduler termination bug. Date: Fri, 27 Jan 2017 10:44:36 +0000 (UTC) archived-at: Fri, 27 Jan 2017 10:44:40 -0000 Repository: incubator-airflow Updated Branches: refs/heads/v1-8-test 40442e58f -> 1060ade28 [AIRFLOW-812] Fix the scheduler termination bug. When checking max-runs for dag_files the scheduler would stop immediately if there were no files. Closes #2027 from fenglu-g/master (cherry picked from commit f8d8ddac08dbec90b240a6b8670be9bd650dfb3b) Signed-off-by: Bolke de Bruin Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/1060ade2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/1060ade2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/1060ade2 Branch: refs/heads/v1-8-test Commit: 1060ade28119a5e1eb81fc331689bffd37b351b3 Parents: 40442e5 Author: Feng Lu Authored: Fri Jan 27 10:45:50 2017 +0100 Committer: Bolke de Bruin Committed: Fri Jan 27 11:44:20 2017 +0100 ---------------------------------------------------------------------- airflow/utils/dag_processing.py | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/1060ade2/airflow/utils/dag_processing.py ---------------------------------------------------------------------- diff --git a/airflow/utils/dag_processing.py b/airflow/utils/dag_processing.py index 6209946..ef1c1ed 100644 --- a/airflow/utils/dag_processing.py +++ b/airflow/utils/dag_processing.py @@ -634,6 +634,8 @@ class DagFileProcessorManager(LoggingMixin): """ :return: whether all file paths have been processed max_runs times """ + if not self._file_paths: # No dag file is present. + return False for file_path in self._file_paths: if self._run_count[file_path] != self._max_runs: return False