restore the tokenizer directory when missing

Automatically repopulate the tokenizer/ directory with the PHP stub
and the postgresql module, when the directory is missing. This allows
to switch working directories and in particular run the service
from a different maschine then where it was installed.
Users still need to make sure that .env files are set up correctly
or they will shoot themselves in the foot.

See #2515.
This commit is contained in:
Sarah Hoffmann
2022-03-20 11:31:42 +01:00
parent e65913d376
commit a0ed80d821
6 changed files with 39 additions and 24 deletions

View File

@@ -217,7 +217,7 @@ class NominatimEnvironment:
self.db_drop_database(self.api_test_db)
raise
tokenizer_factory.create_tokenizer(self.get_test_config(), init_db=False)
tokenizer_factory.get_tokenizer_for_db(self.get_test_config())
def setup_unknown_db(self):