Skip to content

Commit

Permalink
[multiDB]: all application should use API to get redis_client (sonic-…
Browse files Browse the repository at this point in the history
  • Loading branch information
dzhangalibaba authored and qiluo-msft committed Nov 27, 2019
1 parent 1b5679c commit 1898102
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ def reload(filename, yes, load_sysinfo):
_stop_services()
config_db = ConfigDBConnector()
config_db.connect()
client = config_db.redis_clients[config_db.CONFIG_DB]
client = config_db.get_redis_client(config_db.CONFIG_DB)
client.flushdb()
if load_sysinfo:
command = "{} -H -k {} --write-to-db".format(SONIC_CFGGEN_PATH, cfg_hwsku)
Expand Down Expand Up @@ -598,7 +598,7 @@ def load_minigraph():

config_db = ConfigDBConnector()
config_db.connect()
client = config_db.redis_clients[config_db.CONFIG_DB]
client = config_db.get_redis_client(config_db.CONFIG_DB)
client.flushdb()
if os.path.isfile('/etc/sonic/init_cfg.json'):
command = "{} -H -m -j /etc/sonic/init_cfg.json --write-to-db".format(SONIC_CFGGEN_PATH)
Expand Down

0 comments on commit 1898102

Please sign in to comment.