Skip to content

Commit 1898102

Browse files
dzhangalibabaqiluo-msft
authored andcommitted
[multiDB]: all application should use API to get redis_client (sonic-net#753)
1 parent 1b5679c commit 1898102

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

config/main.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ def reload(filename, yes, load_sysinfo):
532532
_stop_services()
533533
config_db = ConfigDBConnector()
534534
config_db.connect()
535-
client = config_db.redis_clients[config_db.CONFIG_DB]
535+
client = config_db.get_redis_client(config_db.CONFIG_DB)
536536
client.flushdb()
537537
if load_sysinfo:
538538
command = "{} -H -k {} --write-to-db".format(SONIC_CFGGEN_PATH, cfg_hwsku)
@@ -598,7 +598,7 @@ def load_minigraph():
598598

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

0 commit comments

Comments
 (0)