Skip to content

Commit

Permalink
add publish interface for DBInterface (sonic-net#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
keboliu authored and lguohan committed Jan 26, 2018
1 parent cd4cb27 commit f65173f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/swsssdk/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,13 @@ def get_redis_client(self, db_name):
"""
return self.redis_clients[db_name]

def publish(self, db_name, channel, message):
"""
Publish message via the channel
"""
client = self.redis_clients[db_name]
return client.publish(channel, message)

@blockable
def keys(self, db_name, pattern='*'):
"""
Expand Down

0 comments on commit f65173f

Please sign in to comment.