diff --git a/api/libs/broadcast_channel/channel.py b/api/libs/broadcast_channel/channel.py index 660f977cfc..8eeac37232 100644 --- a/api/libs/broadcast_channel/channel.py +++ b/api/libs/broadcast_channel/channel.py @@ -93,7 +93,6 @@ class Subscriber(Protocol): @abstractmethod def subscribe(self) -> Subscription: - """Create a new subscription.""" pass diff --git a/api/libs/broadcast_channel/redis/streams_channel.py b/api/libs/broadcast_channel/redis/streams_channel.py index 7c5ce794d6..0218170cc1 100644 --- a/api/libs/broadcast_channel/redis/streams_channel.py +++ b/api/libs/broadcast_channel/redis/streams_channel.py @@ -88,7 +88,8 @@ class _StreamsSubscription(Subscription): # since this method runs in a dedicated thread, acquiring `_lock` inside this method won't cause # deadlock. - # `"0"` replays all retained entries; `"$"` tails only new messages. + # Setting initial last id to `$` to signal redis that we only want new messages. + # # ref: https://redis.io/docs/latest/commands/xread/#the-special--id last_id = "$" try: