index postcodes after refreshing

This commit is contained in:
Sarah Hoffmann
2021-05-13 00:14:52 +02:00
parent 4abaf71234
commit bf864b2c54
3 changed files with 9 additions and 1 deletions

View File

@@ -35,6 +35,9 @@ class _CountryPostcodesCollector:
self._update_from_external(analyzer, project_dir)
to_add, to_delete, to_update = self._compute_changes(conn)
LOG.info("Processing country '%s' (%s added, %s deleted, %s updated).",
self.country, len(to_add), len(to_delete), len(to_update))
with conn.cursor() as cur:
if to_add:
execute_values(cur,
@@ -165,4 +168,4 @@ def update_postcodes(dsn, project_dir, tokenizer):
conn.commit()
analyzer.add_postcodes_from_db()
analyzer.update_postcodes_from_db()