We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd4ec3f commit 425e084Copy full SHA for 425e084
pubsub/cloud-client/quickstart.py
@@ -66,14 +66,14 @@ def create_subscription_safely(subscriber, subscription_path):
66
num_messages = 10
67
68
def resolve_future_callback(future):
69
- # Resolve the future asynchronously and update key in `tracker`.
+ # Resolve the future and update `tracker` asynchronously.
70
+ tracker.update({future: {'pubtime': time.time(), 'subtime': None}})
71
message_id = future.result()
72
tracker[message_id] = tracker.pop(future)
73
74
def publish_messages(publish_func, callback):
75
for i in range(num_messages):
76
future = publish_func(topic_path, data=data, index=str(i))
- tracker.update({future: {'pubtime': time.time(), 'subtime': None}})
77
callback(future)
78
79
# Publish messages.
0 commit comments