From commits-return-17132-archive-asf-public=cust-asf.ponee.io@pulsar.apache.org Tue Nov 6 09:27:26 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 8802118067A for ; Tue, 6 Nov 2018 09:27:26 +0100 (CET) Received: (qmail 43662 invoked by uid 500); 6 Nov 2018 08:27:25 -0000 Mailing-List: contact commits-help@pulsar.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pulsar.apache.org Delivered-To: mailing list commits@pulsar.apache.org Received: (qmail 43653 invoked by uid 99); 6 Nov 2018 08:27:25 -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; Tue, 06 Nov 2018 08:27:25 +0000 From: GitBox To: commits@pulsar.apache.org Subject: [GitHub] sijie closed pull request #2941: Handle case where function produces some output but no output topic given Message-ID: <154149284504.18614.10786638498021203043.gitbox@gitbox.apache.org> Date: Tue, 06 Nov 2018 08:27:25 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit sijie closed pull request #2941: Handle case where function produces some output but no output topic given URL: https://github.com/apache/pulsar/pull/2941 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/pulsar-functions/instance/src/main/python/python_instance.py b/pulsar-functions/instance/src/main/python/python_instance.py index 6f74461e85..66d222c73c 100644 --- a/pulsar-functions/instance/src/main/python/python_instance.py +++ b/pulsar-functions/instance/src/main/python/python_instance.py @@ -272,7 +272,8 @@ def done_producing(self, consumer, orig_message, result, sent_message): consumer.acknowledge(orig_message) def process_result(self, output, msg): - if output is not None: + if output is not None and self.instance_config.function_details.sink.topic != None and \ + len(self.instance_config.function_details.sink.topic) > 0: if self.output_serde is None: self.setup_output_serde() if self.producer is None: ---------------------------------------------------------------- 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