From 9dce66218adac7240ab4dd72d1ce8ffc5c4c3b3f Mon Sep 17 00:00:00 2001 From: dpcollins-google <40498610+dpcollins-google@users.noreply.github.com> Date: Wed, 30 Sep 2020 09:52:35 -0400 Subject: [PATCH 1/2] docs: Document potentially unexpected blocking behavior of publish() method. --- google/cloud/pubsub_v1/publisher/client.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/google/cloud/pubsub_v1/publisher/client.py b/google/cloud/pubsub_v1/publisher/client.py index f1e198b1a..a123e3ff4 100644 --- a/google/cloud/pubsub_v1/publisher/client.py +++ b/google/cloud/pubsub_v1/publisher/client.py @@ -286,6 +286,9 @@ def publish( Add the given message to this object; this will cause it to be published once the batch either has enough messages or a sufficient period of time has elapsed. + + This method may block if LimitExceededBehavior.BLOCK is used in the + flow control settings. Example: >>> from google.cloud import pubsub_v1 From a558ac1a22b8d78403c96543a1898433cbb2b655 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Thu, 15 Oct 2020 13:39:45 -0400 Subject: [PATCH 2/2] Update google/cloud/pubsub_v1/publisher/client.py --- google/cloud/pubsub_v1/publisher/client.py | 1 - 1 file changed, 1 deletion(-) diff --git a/google/cloud/pubsub_v1/publisher/client.py b/google/cloud/pubsub_v1/publisher/client.py index a123e3ff4..bead2af54 100644 --- a/google/cloud/pubsub_v1/publisher/client.py +++ b/google/cloud/pubsub_v1/publisher/client.py @@ -286,7 +286,6 @@ def publish( Add the given message to this object; this will cause it to be published once the batch either has enough messages or a sufficient period of time has elapsed. - This method may block if LimitExceededBehavior.BLOCK is used in the flow control settings.