Skip to content

Commit

Permalink
Include missing parameters in enrich task
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jjmerchante committed Oct 5, 2023
1 parent 8da1f29 commit 532a7ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion sirmordred/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion sirmordred/task_enrich.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 532a7ff

Please sign in to comment.