From: Sarah Hoffmann Date: Sun, 20 Mar 2022 16:49:22 +0000 (+0100) Subject: reinit the tokenizer directory on website refresh X-Git-Tag: v4.1.0~68^2 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/4c66c35ed6b1ec699ffc9e3a69ca2b65adca8e64?ds=sidebyside reinit the tokenizer directory on website refresh This means the project directory is usable again, once refresh --website was run. --- 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)