8000 appengine: add low latency publish comment (#2264) · lwander/python-docs-samples@63c677f · GitHub
[go: up one dir, main page]

Skip to content

Commit 63c677f

Browse files
appengine: add low latency publish comment (GoogleCloudPlatform#2264)
* appengine: add low latency publish comment * nit: remove trailing space * nit: remove spaces
1 parent 696a1cf commit 63c677f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

appengine/flexible/pubsub/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ def index():
4444

4545
data = request.form.get('payload', 'Example payload').encode('utf-8')
4646

47+
# Consider initialzing the publisher client outside this function
48+
# for low latency publish.
4749
publisher = pubsub_v1.PublisherClient()
4850
topic_path = publisher.topic_path(
4951
current_app.config['PROJECT'],

0 commit comments

Comments
 (0)
0