Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyunnnn committed Oct 26, 2023
1 parent 61bb96c commit c07c464
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion samples/snippets/subscriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,7 @@ def callback(message: pubsub_v1.subscriber.message.Message) -> None:
streaming_pull_future.result() # Block until the shutdown is complete.
# [END pubsub_dead_letter_delivery_attempt]


def receive_messages_with_concurrency_control(
project_id: str, subscription_id: str, timeout: Optional[float] = None
) -> None:
Expand All @@ -1027,7 +1028,7 @@ def receive_messages_with_concurrency_control(
def callback(message: pubsub_v1.subscriber.message.Message) -> None:
print(f"Received {message.data!r}.")
message.ack()

streaming_pull_future = subscriber.subscribe(
subscription_path, callback=callback, scheduler=scheduler
)
Expand Down

0 comments on commit c07c464

Please sign in to comment.