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 298E6200BA6 for ; Tue, 18 Oct 2016 20:59:16 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 266DE160AFB; Tue, 18 Oct 2016 18:59: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 6D260160AE5 for ; Tue, 18 Oct 2016 20:59:15 +0200 (CEST) Received: (qmail 77095 invoked by uid 500); 18 Oct 2016 18:59:14 -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 77082 invoked by uid 99); 18 Oct 2016 18:59: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; Tue, 18 Oct 2016 18:59: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 B20831A0847 for ; Tue, 18 Oct 2016 18:59:13 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.398 X-Spam-Level: ** X-Spam-Status: No, score=2.398 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_H2=-0.001, 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-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 ylCraoMsNtaF for ; Tue, 18 Oct 2016 18:59:12 +0000 (UTC) Received: from mail-oi0-f43.google.com (mail-oi0-f43.google.com [209.85.218.43]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 1D0255FAFA for ; Tue, 18 Oct 2016 18:59:04 +0000 (UTC) Received: by mail-oi0-f43.google.com with SMTP id y2so3897320oie.0 for ; Tue, 18 Oct 2016 11:59:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=fl2uQjqxL+wzlwcByJuKmj+D/SmP+Wd3ZjL89TL7rbE=; b=FbP0eMV2y6EpmfLuMLI5tIrb2DgkrOe+M5R7/DN2nINmKBSxL9dceCbqHQ7BZRPm7Y xTQmoQwNLpu2xxEihZtosDjR2i7qElrfeVtFqojVxcG9zDP+babjiigid2j8gqaUsYae iFlR3TttGHWgUrMh/jeDSPxbJKZIi5rIsZo98rP2qJBe2+j3JZCo8eFvxNveC73oGMPT 36UftD6xKxNfJtVHpz3c3H6IKroUlhmhK7RHXueHE9+/8L0THgYeEzut2KwCFmUIN04q GGH4Eb3NRVeo44elf2M1B4L5f1h5UNEkEGRKT7zSo0mnFXsG8cm7vG9nky5udQ34wdkh /2Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=fl2uQjqxL+wzlwcByJuKmj+D/SmP+Wd3ZjL89TL7rbE=; b=mWocB+SGd+VW3eZzZbKuERq9hBcn26NRsJkoxkRvCnV2M4blMO6RDyrAFyDIoGS7EH dK/2HN6MIGMrIOAv9ANYB8o05plu8dTANBgh+ExLBFq7hs7aD51cB0M3tTroTheCjF46 MumUd+oqxGzkodTFU6yjGiL8kv/orI5wy3jIGmfxP8iF7C3WuIS3aKgY66IvpMvkg53U gJKcf5j26qYFl6Raewmto4VIChOz9SyVf8bfycrRSIJVSnOCNDhE5dWQwUUbkJbdJy3E b1Q96GBvjf+TGM9aSpGiz74jovXyN6Qt+WsDaeymtMarQqyPgBPfdmCOLlL0Tkd//Vwj Iptw== X-Gm-Message-State: AA6/9Rk25HZAoI+xVLz1TSDzsHaTfOFaMzNL1dpF67S4shjMVD+Uue3jHfygQnlbHC1AII4eIAOzjS2u2s+Btw== X-Received: by 10.157.43.40 with SMTP id o37mr1264936otb.58.1476817142994; Tue, 18 Oct 2016 11:59:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.34.165 with HTTP; Tue, 18 Oct 2016 11:59:02 -0700 (PDT) From: Jason Chen Date: Tue, 18 Oct 2016 11:59:02 -0700 Message-ID: Subject: Usage of "on_failure_callback" ? To: dev@airflow.incubator.apache.org Content-Type: multipart/alternative; boundary=001a11c1635c34e88c053f284964 archived-at: Tue, 18 Oct 2016 18:59:16 -0000 --001a11c1635c34e88c053f284964 Content-Type: text/plain; charset=UTF-8 Hi airflow team, Is there any sample code to use "on_failure_callback" ? I tried to use that as a callback to "post-process" when a task fails. However, I cannot make it work. The definition of my task is as below (just one task in my dag). It invokes "task0_python_callable" which executes a command-line script and it could drops exception. It in turns making task0 failed. In that case, I am thinking it should trigger the "on_failure_callback" function "task0_failure_cb", but it does not happen. Any suggestion? Thanks. Jason ========= task0 = PythonOperator( task_id='task0', python_callable=task0_python_callable, on_failure_callback=task0_failure_cb, dag=dag) --001a11c1635c34e88c053f284964--