Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ logs/

# UV
.uv/
uv.lock

# Vibe coding
.vibe/
Expand Down
3 changes: 2 additions & 1 deletion src/fireflyframework_genai/exposure/queues/kafka.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ async def publish(self, message: QueueMessage) -> None:
"""Publish *message* to the configured Kafka topic."""
if self._producer is None:
await self.start()
await self._producer.send_and_wait(
producer: Any = self._producer
await producer.send_and_wait(
self._topic,
value=message.body.encode("utf-8"),
headers=[(k, v.encode("utf-8")) for k, v in message.headers.items()] or None,
Expand Down
7 changes: 2 additions & 5 deletions src/fireflyframework_genai/exposure/queues/rabbitmq.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,8 @@ async def publish(self, message: QueueMessage) -> None:
if self._channel is None:
await self.start()

exchange = (
await self._channel.get_exchange(self._exchange_name)
if self._exchange_name
else self._channel.default_exchange
)
channel: Any = self._channel
exchange = await channel.get_exchange(self._exchange_name) if self._exchange_name else channel.default_exchange
amqp_message = aio_pika.Message(
body=message.body.encode("utf-8"),
headers=cast("dict[str, Any]", message.headers) or None,
Expand Down
3 changes: 2 additions & 1 deletion src/fireflyframework_genai/exposure/queues/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ async def publish(self, message: QueueMessage) -> None:
"""Publish *message* to the configured Redis channel."""
if self._client is None:
await self.start()
await self._client.publish(self._channel, message.body.encode("utf-8"))
client: Any = self._client
await client.publish(self._channel, message.body.encode("utf-8"))

async def stop(self) -> None:
"""Close the Redis connection."""
Expand Down
Loading
Loading