From abbde8a46aedc5240693b3451d67f80d4248bc0b Mon Sep 17 00:00:00 2001 From: osagit Date: Fri, 7 May 2021 14:43:25 +0200 Subject: [PATCH] fix: replace redis init with generic ConfigLoader StrictRedis() replaced by ConfigLoader.get_redis_conn() --- bin/Decoder.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/bin/Decoder.py b/bin/Decoder.py index fc8663ad..6844afd3 100755 --- a/bin/Decoder.py +++ b/bin/Decoder.py @@ -29,6 +29,7 @@ from lib import Decoded from module.abstract_module import AbstractModule from Helper import Process from packages import Item +import ConfigLoader class TimeoutException(Exception): @@ -62,13 +63,9 @@ class Decoder(AbstractModule): def __init__(self): - super(Decoder, self).__init__(logger_channel="script:decoder") + super(Decoder, self).__init__() - serv_metadata = redis.StrictRedis( - host=self.process.config.get("ARDB_Metadata", "host"), - port=self.process.config.getint("ARDB_Metadata", "port"), - db=self.process.config.getint("ARDB_Metadata", "db"), - decode_responses=True) + serv_metadata = ConfigLoader.ConfigLoader().get_redis_conn("ARDB_Metadata") regex_binary = '[0-1]{40,}' #regex_hex = '(0[xX])?[A-Fa-f0-9]{40,}'