Skip to content

Commit

Permalink
use get API instead of internal var directly (sonic-net#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
dzhangalibaba authored and qiluo-msft committed Oct 9, 2019
1 parent cf32a7a commit e364884
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/sonic_ax_impl/mibs/ieee802_1ab.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def update_data(self):
"""
if not self.pubsub:
redis_client = self.db_conn.get_redis_client(self.db_conn.APPL_DB)
db = self.db_conn.db_map[self.db_conn.APPL_DB]["db"]
db = self.db_conn.get_dbid(self.db_conn.APPL_DB)
self.pubsub = redis_client.pubsub()
self.pubsub.psubscribe("__keyspace@{}__:{}".format(db, mibs.lldp_entry_table(b'*')))

Expand Down Expand Up @@ -534,7 +534,7 @@ def update_data(self):
"""
if not self.pubsub:
redis_client = self.db_conn.get_redis_client(self.db_conn.APPL_DB)
db = self.db_conn.db_map[self.db_conn.APPL_DB]["db"]
db = self.db_conn.get_dbid(self.db_conn.APPL_DB)
self.pubsub = redis_client.pubsub()
self.pubsub.psubscribe("__keyspace@{}__:{}".format(db, mibs.lldp_entry_table(b'*')))

Expand Down
2 changes: 1 addition & 1 deletion src/sonic_ax_impl/mibs/ietf/rfc2737.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def update_data(self):
# does not support pubsub
if not self.pubsub:
redis_client = self.statedb.get_redis_client(self.statedb.STATE_DB)
db = self.statedb.db_map[self.statedb.STATE_DB]["db"]
db = self.statedb.get_dbid(self.statedb.STATE_DB)
self.pubsub = redis_client.pubsub()
self.pubsub.psubscribe("__keyspace@{}__:{}".format(db, self.TRANSCEIVER_KEY_PATTERN))

Expand Down

0 comments on commit e364884

Please sign in to comment.