Reputation: 1195
I'm testing redis-py
: https://github.com/andymccurdy/redis-py.
I have a hard time figuring out how to call and get output for the redis
command PUBSUB channels
.
Upvotes: 0
Views: 2221
Reputation: 3693
To get all channels:
chans = r.pubsub_channels()
To get the number of subscribers to a channel:
num = r.pubsub_numsub('channel')
Upvotes: 4