From 532a7ffd9edeed66b9ebfaf1f209a8d935932c87 Mon Sep 17 00:00:00 2001 From: Jose Javier Merchante Date: Thu, 5 Oct 2023 11:52:40 +0200 Subject: [PATCH] Include missing parameters in enrich task There are some SortingHat parameters that weren't included when starting the enrich_backend. This was not raising any error because the backend was initialized in the load_identities method, but if that method is skipped, the enrich backend process fails. Signed-off-by: Jose Javier Merchante --- sirmordred/task.py | 4 +++- sirmordred/task_enrich.py | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sirmordred/task.py b/sirmordred/task.py index 9522884a..884a74e9 100644 --- a/sirmordred/task.py +++ b/sirmordred/task.py @@ -188,7 +188,9 @@ def _get_enrich_backend(self): json_projects_map = self.conf['projects']['projects_file'] enrich_backend = connector[2](self.db_sh, json_projects_map, - self.db_user, self.db_password, self.db_host) + self.db_user, self.db_password, self.db_host, + self.db_path, self.db_port, self.db_ssl, self.db_verify_ssl, + self.db_tenant) elastic_enrich = get_elastic(self.conf['es_enrichment']['url'], self.conf[self.backend_section]['enriched_index'], clean, enrich_backend) diff --git a/sirmordred/task_enrich.py b/sirmordred/task_enrich.py index ea510781..ecb2aaa1 100644 --- a/sirmordred/task_enrich.py +++ b/sirmordred/task_enrich.py @@ -440,7 +440,6 @@ def execute(self): if autorefresh and self.db: logger.info('[%s] autorefresh start', self.backend_section) - a = self._get_enrich_backend() self.__autorefresh(self._get_enrich_backend()) logger.info('[%s] autorefresh end', self.backend_section) else: