Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
extreme4all committed Nov 26, 2023
1 parent 4fa461f commit 42e443f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,10 @@ async def send_messages(topic: str, producer: AIOKafkaProducer, send_queue: Queu

while True:
if send_queue.empty():
start_time, messages_sent = log_speed(
counter=messages_sent, start_time=start_time, _queue=send_queue
)
if messages_sent > 0:
start_time, messages_sent = log_speed(
counter=messages_sent, start_time=start_time, _queue=send_queue
)
await asyncio.sleep(1)
continue
message = await send_queue.get()
Expand Down

0 comments on commit 42e443f

Please sign in to comment.