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.
subscriber.subscribe()
1 parent 5fd6f78 commit d3aa3f5Copy full SHA for d3aa3f5
samples/snippets/subscriber.py
@@ -255,13 +255,13 @@ def callback(message):
255
print('Received message: {}'.format(message))
256
message.ack()
257
258
- subscription = subscriber.subscribe(subscription_path, callback=callback)
+ future = subscriber.subscribe(subscription_path, callback=callback)
259
260
# Blocks the thread while messages are coming in through the stream. Any
261
# exceptions that crop up on the thread will be set on the future.
262
try:
263
# When timeout is unspecified, the result method waits indefinitely.
264
- subscription.future.result(timeout=30)
+ future.result(timeout=30)
265
except Exception as e:
266
print(
267
'Listening for messages on {} threw an Exception: {}.'.format(
0 commit comments