File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414
1515
1616from functools import cache
17- from typing import TypeAlias
1817from aio_pika .robust_connection import (
1918 AbstractRobustConnection ,
2019 AbstractRobustChannel ,
Original file line number Diff line number Diff line change @@ -45,8 +45,8 @@ async def start(self) -> None:
4545 print ("start" , self ._op )
4646 if self ._fn :
4747 async with self ._params .pool .acquire () as ch :
48- if self ._params .amqp_params .prefetch_count :
49- await ch .set_qos (prefetch_count = self . _params . amqp_params . prefetch_count )
48+ if prefetch_count := self ._params .amqp_params .get ( " prefetch_count" ) :
49+ await ch .set_qos (prefetch_count = prefetch_count )
5050 q = self ._queue = await self ._declare (ch )
5151 self ._consumer_tag = await q .consume (self ._consumer )
5252 return
Original file line number Diff line number Diff line change 11from typing import TypedDict
22
3+
34class AmqpParams (TypedDict , total = False ):
4- prefetch_count : str
5+ prefetch_count : int
You can’t perform that action at this time.
0 commit comments