From 4c66c35ed6b1ec699ffc9e3a69ca2b65adca8e64 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sun, 20 Mar 2022 17:49:22 +0100 Subject: [PATCH] reinit the tokenizer directory on website refresh This means the project directory is usable again, once refresh --website was run. --- nominatim/clicmd/refresh.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nominatim/clicmd/refresh.py b/nominatim/clicmd/refresh.py index b8a88b6d..3c245cd4 100644 --- a/nominatim/clicmd/refresh.py +++ b/nominatim/clicmd/refresh.py @@ -117,6 +117,10 @@ class UpdateRefresh: if args.website: webdir = args.project_dir / 'website' LOG.warning('Setting up website directory at %s', webdir) + # This is a little bit hacky: call the tokenizer setup, so that + # the tokenizer directory gets repopulated as well, in case it + # wasn't there yet. + self._get_tokenizer(args.config) with connect(args.config.get_libpq_dsn()) as conn: refresh.setup_website(webdir, args.config, conn) -- 2.39.5