Skip to content

Commit 0ccd7cc

Browse files
committed
fix: use float to parse delay
1 parent 3c4ccb2 commit 0ccd7cc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

taskiq_aio_pika/broker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ async def kick(self, message: BrokerMessage) -> None:
367367
delivery_mode=DeliveryMode.PERSISTENT,
368368
priority=priority,
369369
)
370-
delay = parse_val(int, message.labels.get("delay"))
370+
delay = parse_val(float, message.labels.get("delay"))
371371

372372
if len(self._task_queues) == 1:
373373
routing_key_name = (

tests/test_routing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ async def test_when_queue_bind_with_pattern_and_exchange_type_topic__when_messag
181181
), "Message was not routed to queue, but should be by specific name"
182182
await received_message_2.ack()
183183

184-
async def test_when_exchange_fanaout__when_message_published_in_all_queues(
184+
async def test_when_exchange_fanout__when_message_published_in_all_queues(
185185
self,
186186
amqp_url: str,
187187
test_channel: Channel,

0 commit comments

Comments
 (0)