X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/c1fa70639ba2f861cd6a7718e5b02f0ade763abc..2cdbcac353805767df011edc494f8067f9409f63:/nominatim/clicmd/replication.py diff --git a/nominatim/clicmd/replication.py b/nominatim/clicmd/replication.py index 44eec5f1..7ad82c4f 100644 --- a/nominatim/clicmd/replication.py +++ b/nominatim/clicmd/replication.py @@ -136,6 +136,7 @@ class UpdateReplication: recheck_interval = args.config.get_int('REPLICATION_RECHECK_INTERVAL') tokenizer = tokenizer_factory.get_tokenizer_for_db(args.config) + indexer = Indexer(args.config.get_libpq_dsn(), tokenizer, args.threads or 1) while True: with connect(args.config.get_libpq_dsn()) as conn: @@ -148,8 +149,6 @@ class UpdateReplication: if state is not replication.UpdateState.NO_CHANGES and args.do_index: index_start = dt.datetime.now(dt.timezone.utc) - indexer = Indexer(args.config.get_libpq_dsn(), tokenizer, - args.threads or 1) indexer.index_full(analyse=False) with connect(args.config.get_libpq_dsn()) as conn: