Sometimes there is a need to send multiple messages to a channel (or group) at once. While this can be done using a group of asyncio tasks, the underlying logic will be suboptimal, cause there would be multiple redis calls for discarding old messages, checking the capacity, appending to the set and setting the expiration.
It would be cool if there were optimized functions for that using a single zadd call.
Something like this:
Feature request
Sometimes there is a need to send multiple messages to a channel (or group) at once. While this can be done using a group of
asyncio
tasks, the underlying logic will be suboptimal, cause there would be multiple redis calls for discarding old messages, checking the capacity, appending to the set and setting the expiration.It would be cool if there were optimized functions for that using a single
zadd
call. Something like this:I am not sure if such an issue should be created in the
channels
repo first, let me know if that's the case.