Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9855121

Browse filesBrowse files
appengine: add low latency publish comment (GoogleCloudPlatform#2265)
* appengine: add low latency publish comment * nit: remove spaces
1 parent 63c677f commit 9855121
Copy full SHA for 9855121

File tree

Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed
Filter options
  • appengine/standard_python37/pubsub
Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed

‎appengine/standard_python37/pubsub/main.py

Copy file name to clipboardExpand all lines: appengine/standard_python37/pubsub/main.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ def index():
4848

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

51+
# Consider initializing the publisher client outside this function
52+
# for better latency performance.
5153
publisher = pubsub_v1.PublisherClient()
5254
topic_path = publisher.topic_path(app.config['GCLOUD_PROJECT'],
5355
app.config['PUBSUB_TOPIC'])

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.