Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print actual number of messages pulled #2078

Merged
merged 2 commits into from
Aug 12, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pubsub/cloud-client/subscriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def synchronous_pull(project_id, subscription_name):
# Acknowledges the received messages so they will not be sent again.
subscriber.acknowledge(subscription_path, ack_ids)

print("Received and acknowledged {} messages. Done.".format(NUM_MESSAGES))
print("Received and acknowledged {} messages. Done.".format(len(response.received_messages)))
olivercoad marked this conversation as resolved.
Show resolved Hide resolved
# [END pubsub_subscriber_sync_pull]


Expand Down Expand Up @@ -357,7 +357,7 @@ def worker(msg):
if processes:
time.sleep(SLEEP_TIME)

print("Received and acknowledged {} messages. Done.".format(NUM_MESSAGES))
print("Received and acknowledged {} messages. Done.".format(len(response.received_messages)))
olivercoad marked this conversation as resolved.
Show resolved Hide resolved
# [END pubsub_subscriber_sync_pull_with_lease]


Expand Down