Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.
Closed
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
4 changes: 2 additions & 2 deletions broadcaster/_backends/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ async def subscribe(self, channel: str) -> None:
async def unsubscribe(self, channel: str) -> None:
await self._subscriber.unsubscribe([channel])

async def publish(self, channel: str, message: typing.Any) -> None:
await self._pub_conn.publish(channel, message)
async def publish(self, channel: str, message: typing.Any) -> int:
return await self._pub_conn.publish(channel, message)

async def next_published(self) -> Event:
message = await self._subscriber.next_published()
Expand Down
4 changes: 2 additions & 2 deletions broadcaster/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ async def _listener(self) -> None:
for queue in list(self._subscribers.get(event.channel, [])):
await queue.put(event)

async def publish(self, channel: str, message: Any) -> None:
await self._backend.publish(channel, message)
async def publish(self, channel: str, message: Any) -> Optional[int]:
return await self._backend.publish(channel, message)

@asynccontextmanager
async def subscribe(self, channel: str) -> AsyncIterator["Subscriber"]:
Expand Down