From commits-return-24018-archive-asf-public=cust-asf.ponee.io@airflow.incubator.apache.org Fri Sep 28 18:41:23 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id B8FCD180675 for ; Fri, 28 Sep 2018 18:41:22 +0200 (CEST) Received: (qmail 1416 invoked by uid 500); 28 Sep 2018 16:41:21 -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 1407 invoked by uid 99); 28 Sep 2018 16:41:21 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Sep 2018 16:41:21 +0000 From: GitBox To: commits@airflow.apache.org Subject: [GitHub] akosel commented on a change in pull request #2372: [AIRFLOW-393] Add callback for FTP downloads Message-ID: <153815288121.13694.1040899352777657799.gitbox@gitbox.apache.org> Date: Fri, 28 Sep 2018 16:41:21 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit akosel commented on a change in pull request #2372: [AIRFLOW-393] Add callback for FTP downloads URL: https://github.com/apache/incubator-airflow/pull/2372#discussion_r221313853 ########## File path: airflow/contrib/hooks/ftp_hook.py ########## @@ -161,6 +165,9 @@ def retrieve_file(self, remote_full_path, local_full_path_or_buffer): :param local_full_path_or_buffer: full path to the local file or a file-like buffer :type local_full_path_or_buffer: str or file-like buffer + :param callback: callback that can be used for tracking download + progress, among other things + :type callback: callable Review comment: Good idea! I also added an example section to the docstring. If that seems excessive, I can remove it. Emphasis on the need to handle writing to the file inside of the custom callback if it is used. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services