]> git.openstreetmap.org Git - nominatim.git/commitdiff
reinit the tokenizer directory on website refresh
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 20 Mar 2022 16:49:22 +0000 (17:49 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Sun, 20 Mar 2022 16:49:22 +0000 (17:49 +0100)
This means the project directory is usable again, once refresh --website
was run.

nominatim/clicmd/refresh.py

index b8a88b6d615b5b5c04445f393a71a81c1b6cc112..3c245cd46e84b385a39288f537bb50813f8f284f 100644 (file)
@@ -117,6 +117,10 @@ class UpdateRefresh:
         if args.website:
             webdir = args.project_dir / 'website'
             LOG.warning('Setting up website directory at %s', webdir)
         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)
 
             with connect(args.config.get_libpq_dsn()) as conn:
                 refresh.setup_website(webdir, args.config, conn)