fix: [v4.1] fix ardb # tracking DB

This commit is contained in:
Terrtia 2022-03-07 15:54:56 +01:00
parent 7e6577961b
commit 68c96ef7a7
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0
3 changed files with 8 additions and 5 deletions

View file

@ -589,6 +589,7 @@ function menu_display {
shutdown; shutdown;
;; ;;
Update) Update)
checking_configuration;
update; update;
;; ;;
Update-config) Update-config)
@ -634,7 +635,8 @@ while [ "$1" != "" ]; do
;; ;;
-m | --menu ) menu_display; -m | --menu ) menu_display;
;; ;;
-u | --update ) update "--manual"; -u | --update ) checking_configuration;
update "--manual";
;; ;;
-t | --test ) launch_tests; -t | --test ) launch_tests;
;; ;;

View file

@ -155,7 +155,7 @@ db = 0
[DB_Tracking] [DB_Tracking]
host = localhost host = localhost
port = 6382 port = 6382
db = 3 db = 2
[ARDB_Sentiment] [ARDB_Sentiment]
host = localhost host = localhost

View file

@ -21,9 +21,10 @@ class Updater(AIL_Updater):
super(Updater, self).__init__(version) super(Updater, self).__init__(version)
def update(self): def update(self):
config_loader = ConfigLoader.ConfigLoader() r_tracking = redis.StrictRedis( host=localhost,
r_tracking = config_loader.get_redis_conn("DB_Tracking") port=6382),
config_loader = None db=2,
decode_responses=True )
# FLUSH OLD DB # FLUSH OLD DB
r_tracking.flushdb() r_tracking.flushdb()