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 A18132004C8 for ; Mon, 9 May 2016 20:58:16 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A013B160A0F; Mon, 9 May 2016 18:58:16 +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 BC25516099C for ; Mon, 9 May 2016 20:58:15 +0200 (CEST) Received: (qmail 75254 invoked by uid 500); 9 May 2016 18:58:15 -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 75242 invoked by uid 99); 9 May 2016 18:58:14 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2016 18:58:14 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 8BB161A458A for ; Mon, 9 May 2016 18:58:14 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.021 X-Spam-Level: X-Spam-Status: No, score=-4.021 tagged_above=-999 required=6.31 tests=[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=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id GRq53BF9eAl2 for ; Mon, 9 May 2016 18:58:13 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id 77ABE5F2C5 for ; Mon, 9 May 2016 18:58:13 +0000 (UTC) Received: (qmail 73642 invoked by uid 99); 9 May 2016 18:58:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2016 18:58:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D5CAA2C14F8 for ; Mon, 9 May 2016 18:58:12 +0000 (UTC) Date: Mon, 9 May 2016 18:58:12 +0000 (UTC) From: "Chris Riccomini (JIRA)" To: commits@airflow.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AIRFLOW-81) Scheduler blackout time period MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 09 May 2016 18:58:16 -0000 [ https://issues.apache.org/jira/browse/AIRFLOW-81?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276817#comment-15276817 ] Chris Riccomini commented on AIRFLOW-81: ---------------------------------------- What do you think about writing a new sensor based off of the TimeSensor that blocks during the blackout period? > Scheduler blackout time period > ------------------------------ > > Key: AIRFLOW-81 > URL: https://issues.apache.org/jira/browse/AIRFLOW-81 > Project: Apache Airflow > Issue Type: Wish > Components: scheduler > Reporter: Sean McIntyre > Priority: Minor > Labels: features > > I have the need for a scheduler blackout time period in Airflow. > My team, which uses Airflow, has been asked to not query one of my company's data sources between midnight and 7 AM. When we launch big backfills on this data source, it would be nice to have the Scheduler not schedule some TaskInstances during the blackout hours. > We (@r39132 and @ledsusop) brainstormed a few ideas on gitter on how to do this... > (1) Put more state/logic in the TaskInstance and Scheduler like this: > my_task = PythonOperator( > task_id='my_task', > python_callable=my_command_that_access_the_datasource, > provide_context=True, > dag=dag, > blackout=my_blackout_logic_for_the_datasource # <--- > ) > where my_blackout_logic is some function I provide that the scheduler calls to determine whether or not it is the blackout period. > (2) Pause DAGs on nightly basis. This can be done with the `pause_dag` CLI command scheduled by cron / Jenkins. However could this be considered a core feature to bring into the Airflow UI and scheduling system? -- This message was sent by Atlassian JIRA (v6.3.4#6332)