From 0dd4f27c40ac4c506137b140230a52fdda86204f Mon Sep 17 00:00:00 2001 From: MaPePeR Date: Tue, 30 May 2023 17:23:30 +0200 Subject: [PATCH] Use snake case for message generator --- .../examples/7-publisher-confirms/publish_asynchronously.py | 4 ++-- .../examples/7-publisher-confirms/publish_batches.py | 4 ++-- .../examples/7-publisher-confirms/publish_individually.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/source/rabbitmq-tutorial/examples/7-publisher-confirms/publish_asynchronously.py b/docs/source/rabbitmq-tutorial/examples/7-publisher-confirms/publish_asynchronously.py index f56f5dbf..a7057aff 100644 --- a/docs/source/rabbitmq-tutorial/examples/7-publisher-confirms/publish_asynchronously.py +++ b/docs/source/rabbitmq-tutorial/examples/7-publisher-confirms/publish_asynchronously.py @@ -5,7 +5,7 @@ from aiormq.exceptions import DeliveryError -def getMessagesToPublish(): +def get_messages_to_publish(): for i in range(10000): yield f"Hello World {i}!".encode() @@ -38,7 +38,7 @@ async def main() -> None: async with asyncio.TaskGroup() as tg: # Sending the messages - for msg in getMessagesToPublish(): + for msg in get_messages_to_publish(): tg.create_task( channel.default_exchange.publish( Message(msg), diff --git a/docs/source/rabbitmq-tutorial/examples/7-publisher-confirms/publish_batches.py b/docs/source/rabbitmq-tutorial/examples/7-publisher-confirms/publish_batches.py index 57997521..4a8cf309 100644 --- a/docs/source/rabbitmq-tutorial/examples/7-publisher-confirms/publish_batches.py +++ b/docs/source/rabbitmq-tutorial/examples/7-publisher-confirms/publish_batches.py @@ -3,7 +3,7 @@ from aio_pika import Message, connect -def getMessagesToPublish(): +def get_messages_to_publish(): for i in range(10000): yield f"Hello World {i}!".encode() @@ -23,7 +23,7 @@ async def main() -> None: outstanding_messages = [] # Sending the messages - for msg in getMessagesToPublish(): + for msg in get_messages_to_publish(): outstanding_messages.append( channel.default_exchange.publish( Message(msg), diff --git a/docs/source/rabbitmq-tutorial/examples/7-publisher-confirms/publish_individually.py b/docs/source/rabbitmq-tutorial/examples/7-publisher-confirms/publish_individually.py index 05e57dbb..484ceb90 100644 --- a/docs/source/rabbitmq-tutorial/examples/7-publisher-confirms/publish_individually.py +++ b/docs/source/rabbitmq-tutorial/examples/7-publisher-confirms/publish_individually.py @@ -3,7 +3,7 @@ from aio_pika import Message, connect -def getMessagesToPublish(): +def get_messages_to_publish(): for i in range(10000): yield f"Hello World {i}!".encode() @@ -20,7 +20,7 @@ async def main() -> None: queue = await channel.declare_queue("hello") # Sending the messages - for msg in getMessagesToPublish(): + for msg in get_messages_to_publish(): # Waiting for publisher confirmation with timeout for every message await channel.default_exchange.publish( Message(msg),