forked from hans/Nominatim
introduce external processing in indexer
Indexing is now split into three parts: first a preparation step that collects the necessary information from the database and returns it to Python. In a second step the data is transformed within Python as necessary and then returned to the database through the usual UPDATE which now not only sets the indexed_status but also other fields. The third step comprises the address computation which is still done inside the update trigger in the database. The second processing step doesn't do anything useful yet.
This commit is contained in:
@@ -106,9 +106,19 @@ class NominatimEnvironment:
|
||||
self.website_dir.cleanup()
|
||||
|
||||
self.website_dir = tempfile.TemporaryDirectory()
|
||||
cfg = Configuration(None, self.src_dir / 'settings', environ=self.test_env)
|
||||
cfg.lib_dir.php = self.src_dir / 'lib-php'
|
||||
refresh.setup_website(Path(self.website_dir.name) / 'website', cfg)
|
||||
refresh.setup_website(Path(self.website_dir.name) / 'website',
|
||||
self.get_test_config())
|
||||
|
||||
|
||||
def get_test_config(self):
|
||||
cfg = Configuration(Path(self.website_dir.name), self.src_dir / 'settings',
|
||||
environ=self.test_env)
|
||||
cfg.set_libdirs(module=self.build_dir / 'module',
|
||||
osm2pgsql=self.build_dir / 'osm2pgsql' / 'osm2pgsql',
|
||||
php=self.src_dir / 'lib-php',
|
||||
sql=self.src_dir / 'lib-sql',
|
||||
data=self.src_dir / 'data')
|
||||
return cfg
|
||||
|
||||
def get_libpq_dsn(self):
|
||||
dsn = self.test_env['NOMINATIM_DATABASE_DSN']
|
||||
|
||||
Reference in New Issue
Block a user