Skip to content

Commit

Permalink
await async sleep (#26853)
Browse files Browse the repository at this point in the history
  • Loading branch information
kashifkhan authored Oct 17, 2022
1 parent 9b240ac commit 4db368e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ async def on_event(partition_context, event):
consumer = EventHubConsumerClient.from_connection_string(connection_str, consumer_group="$default", uamqp_transport=uamqp_transport)
receive_thread = asyncio.ensure_future(consumer.receive(on_event=on_event))

asyncio.sleep(5)
await asyncio.sleep(5)
sent_events = defaultdict(list)

async def on_success(events, pid):
Expand Down Expand Up @@ -195,7 +195,7 @@ async def on_event(partition_context, event):
consumer = EventHubConsumerClient.from_connection_string(connection_str, consumer_group="$default", uamqp_transport=uamqp_transport)
receive_thread = asyncio.ensure_future(consumer.receive(on_event=on_event))

asyncio.sleep(5)
await asyncio.sleep(5)
sent_events = defaultdict(list)

async def on_success(events, pid):
Expand Down

0 comments on commit 4db368e

Please sign in to comment.