Skip to content

Commit

Permalink
Merge pull request #831 from AngusP/master
Browse files Browse the repository at this point in the history
Add pattern support to PUBSUB CHANNELS (minor, fix)
  • Loading branch information
andymccurdy committed Feb 5, 2017
2 parents ef9a5f0 + 311a840 commit 8474249
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions redis/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2017,11 +2017,11 @@ def publish(self, channel, message):
"""
return self.execute_command('PUBLISH', channel, message)

def pubsub_channels(self):
def pubsub_channels(self, pattern='*'):
"""
Return a list of channels that have at least one subscriber
"""
return self.execute_command('PUBSUB CHANNELS')
return self.execute_command('PUBSUB CHANNELS', pattern)

def pubsub_numpat(self):
"""
Expand Down

0 comments on commit 8474249

Please sign in to comment.