Skip to content

Commit

Permalink
Set enrich parameters with keyword argument
Browse files Browse the repository at this point in the history
This commit includes the keyword argument for all the parameters
when initializing an enrich backend to avoid issues.

Signed-off-by: Jose Javier Merchante <[email protected]>
  • Loading branch information
jjmerchante committed Oct 18, 2023
1 parent fe3da3a commit 82092aa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions sirmordred/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@ def _get_enrich_backend(self):
if 'projects_file' in self.conf['projects']:
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_path, self.db_port, self.db_ssl, self.db_verify_ssl,
self.db_tenant)
enrich_backend = connector[2](db_sortinghat=self.db_sh, json_projects_map=json_projects_map,
db_user=self.db_user, db_password=self.db_password, db_host=self.db_host,
db_port=self.db_port, db_path=self.db_path, db_ssl=self.db_ssl,
db_verify_ssl=self.db_verify_ssl, db_tenant=self.db_tenant)
elastic_enrich = get_elastic(self.conf['es_enrichment']['url'],
self.conf[self.backend_section]['enriched_index'],
clean, enrich_backend)
Expand Down
6 changes: 4 additions & 2 deletions sirmordred/task_enrich.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,10 @@ def __autorefresh_studies(self, cfg):
logger.debug("Doing autorefresh for Areas of Code study")

# Create a GitEnrich backend tweaked to work with AOC index
aoc_backend = GitEnrich(self.db_sh, cfg['projects']['projects_file'],
self.db_user, self.db_password, self.db_host)
aoc_backend = GitEnrich(db_sortinghat=self.db_sh, json_projects_map=cfg['projects']['projects_file'],
db_user=self.db_user, db_password=self.db_password, db_host=self.db_host,
db_port=self.db_port, db_path=self.db_path, db_ssl=self.db_ssl,
db_verify_ssl=self.db_verify_ssl, db_tenant=self.db_tenant)
aoc_backend.mapping = None
aoc_backend.roles = ['author']
elastic_enrich = get_elastic(self.conf['es_enrichment']['url'],
Expand Down

0 comments on commit 82092aa

Please sign in to comment.