File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -284,7 +284,8 @@ def synchronous_pull(project_id, subscription_name):
284284 # Acknowledges the received messages so they will not be sent again.
285285 subscriber .acknowledge (subscription_path , ack_ids )
286286
287- print ("Received and acknowledged {} messages. Done." .format (NUM_MESSAGES ))
287+ print ('Received and acknowledged {} messages. Done.' .format (
288+ len (response .received_messages )))
288289 # [END pubsub_subscriber_sync_pull]
289290
290291
@@ -357,7 +358,8 @@ def worker(msg):
357358 if processes :
358359 time .sleep (SLEEP_TIME )
359360
360- print ("Received and acknowledged {} messages. Done." .format (NUM_MESSAGES ))
361+ print ('Received and acknowledged {} messages. Done.' .format (
362+ len (response .received_messages )))
361363 # [END pubsub_subscriber_sync_pull_with_lease]
362364
363365
You can’t perform that action at this time.
0 commit comments