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 72ABE200D28 for ; Mon, 23 Oct 2017 19:10:49 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 70D6B1609E0; Mon, 23 Oct 2017 17:10:49 +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 B59921609DF for ; Mon, 23 Oct 2017 19:10:48 +0200 (CEST) Received: (qmail 70190 invoked by uid 500); 23 Oct 2017 17:10:47 -0000 Mailing-List: contact dev-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 dev@airflow.incubator.apache.org Received: (qmail 70178 invoked by uid 99); 23 Oct 2017 17:10:47 -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, 23 Oct 2017 17:10:47 +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 C968D1A00A2 for ; Mon, 23 Oct 2017 17:10:46 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.379 X-Spam-Level: ** X-Spam-Status: No, score=2.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id r-M7Xllu5m6S for ; Mon, 23 Oct 2017 17:10:45 +0000 (UTC) Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id D1DBC5FB52 for ; Mon, 23 Oct 2017 17:10:44 +0000 (UTC) Received: by mail-wm0-f46.google.com with SMTP id u138so10882910wmu.5 for ; Mon, 23 Oct 2017 10:10:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:date:references:to:in-reply-to:message-id; bh=5pG0X7Bczth1H93JYWeOVmn3wcH4bfAWKwZ5vPmfSWA=; b=TVFOrW/99ILKniitFS/EC+tWtPkr/k0dRXn7Vq0iRPpjgTAAMYZDyO070wDy7+c4AO HanEnYyq24utrtZqYr4SuScdb/sN6g67cQpDToSB8W/hiMTpEb26pvWKKsKilszS1ja1 ziWQQ+Mxt27uoaW6S8FJrvSuikNiak2cYf/bbL0StwZ6fzncf0olu6CEt83onbWOALD3 ekhWvFR/VmzcPY0T4qyF//z14yeH1iah9va8soMtyqCaJUp8K7OxpigakHiN9Rj2LSaM IGuwbMhJslMSmMZR55BTtq2j9cU99WpFaay6KkkLuYYEKur2cPUHYR9DUzhXg1JiHy9P xTDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:date:references:to :in-reply-to:message-id; bh=5pG0X7Bczth1H93JYWeOVmn3wcH4bfAWKwZ5vPmfSWA=; b=EVHN2CMiQ7g1YtCCYBqfWxKvu1sP23FBhmEBwHxFjcA3pJ2Luhfm6dw+F/QpCAgw9N jDQ47rFKaOirlQWKKZapGVusyVzHNzK7N9p6xmMC4V7C4tgxTk3Gx6vtLWgU9i3a/25H qwayxj6A/D885RL7OLqyPPGBUWSQN9hOvH2cFEIaENiVf5TT07dBuMb+k3EmBvY1Ty9P vJmfhH9KzaI1s7Q9aQTCqAydk4OA5O8G+lRInUHosBc9f9pitY/on+m+hpEEjQK1Hm01 nB45VnrH3XzYeylwIb2VLMvurl3qBCQvwKu083MMC7IA6RgPO1megBVUWmkzX4zhwPvG X8hA== X-Gm-Message-State: AMCzsaX5nrJcmHPz4m9kK2XVJ5I3X0M7Nj9dHEW2dz43Z3tbjr2i3xsv h4VQWY+qWdGpj0ECpxxNbiBVveaXgJbq X-Google-Smtp-Source: ABhQp+RvqpTmo5XBVlJ2LFoutVAfjYQzXzmr6W5VJodyHwuWvfE/NgUBTSnAti1Jk38V1chDOA+AOA== X-Received: by 10.80.213.14 with SMTP id u14mr16978271edi.87.1508778644160; Mon, 23 Oct 2017 10:10:44 -0700 (PDT) Received: from bolkes-mbp.localdomain (f248061.upc-f.chello.nl. [80.56.248.61]) by smtp.gmail.com with ESMTPSA id k5sm6596336edc.61.2017.10.23.10.10.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Oct 2017 10:10:43 -0700 (PDT) From: Bolke de Bruin Content-Type: multipart/alternative; boundary="Apple-Mail=_C5CFA8F6-CC62-48A8-9122-34B87789DFC9" Mime-Version: 1.0 (Mac OS X Mail 11.0 \(3445.1.7\)) Subject: Re: Sensors Date: Mon, 23 Oct 2017 19:10:42 +0200 References: To: dev@airflow.incubator.apache.org In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3445.1.7) archived-at: Mon, 23 Oct 2017 17:10:49 -0000 --Apple-Mail=_C5CFA8F6-CC62-48A8-9122-34B87789DFC9 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 I think you can do something like Azure functions blob storage binding = and let that kick off a dag by triggering it from the Rest API: = https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-= storage-blob = I don=E2=80=99t use Azure so it might not fit your case. Bolke > On 23 Oct 2017, at 16:15, Grant Nicholas = wrote: >=20 > It sounds like you want a background daemon that continuously monitors = the > status of some external system and triggers things on a condition. = This > does not sound like an ETL job, and thus airflow is not a great fit = for > this type of problem. That said, there are workarounds like you = mentioned. > One easy workaround if you can handle a delay between `condition = happens -> > dag triggers` is setting your controller dag to have a recurring = schedule > (ie: not None). Then when that controlling dag is triggered, you just > perform your sensor check once and then trigger/don't trigger another = dag > depending on the condition. The thing I'd be worried about with your > `trigger dagrun` approach is if the trigger dagrun operator fails for = any > reason you'll stop monitoring the external system, while with the = scheduled > approach you don't have to worry about the failure modes of retrying = failed > dags/etc. >=20 > On Mon, Oct 23, 2017 at 2:30 AM, Niels Zeilemaker = > wrote: >=20 >> Hi Guys, >>=20 >> I've created a Sensor which is monitoring the number of files in an >> Azure Blobstore. If the number of files increases, then I would like >> to trigger another dag. This is more or less similar to the >> example_trigger_controller_dag.py and example_trigger_target_dag.py >> setup. >>=20 >> However, after triggering the target DAG I would want my controller >> DAG to start monitoring the Blobstore again. But since the schedule = of >> the controller DAG is set to None, it doesn't continue monitoring. I >> "fixed" this by adding a TriggerDAG which schedules a new run of the >> Controller DAG. But this feels a bit like a hack. >>=20 >> Does someone have any experience which such a continuous monitoring >> sensor? Or know of a better way to achieve this? >>=20 >> Thanks, >> Niels >>=20 --Apple-Mail=_C5CFA8F6-CC62-48A8-9122-34B87789DFC9--