mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
fix off-by-one error in replication download
This commit is contained in:
@@ -336,7 +336,8 @@ class UpdateReplication:
|
|||||||
conn = connect(args.config.get_libpq_dsn())
|
conn = connect(args.config.get_libpq_dsn())
|
||||||
start = dt.datetime.now(dt.timezone.utc)
|
start = dt.datetime.now(dt.timezone.utc)
|
||||||
state = replication.update(conn, params)
|
state = replication.update(conn, params)
|
||||||
status.log_status(conn, start, 'import')
|
if state is not replication.UpdateState.NO_CHANGES:
|
||||||
|
status.log_status(conn, start, 'import')
|
||||||
batchdate, _, _ = status.get_status(conn)
|
batchdate, _, _ = status.get_status(conn)
|
||||||
conn.close()
|
conn.close()
|
||||||
|
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ def update(conn, options):
|
|||||||
repl = ReplicationServer(options['base_url'])
|
repl = ReplicationServer(options['base_url'])
|
||||||
|
|
||||||
outhandler = WriteHandler(str(options['import_file']))
|
outhandler = WriteHandler(str(options['import_file']))
|
||||||
endseq = repl.apply_diffs(outhandler, startseq,
|
endseq = repl.apply_diffs(outhandler, startseq + 1,
|
||||||
max_size=options['max_diff_size'] * 1024)
|
max_size=options['max_diff_size'] * 1024)
|
||||||
outhandler.close()
|
outhandler.close()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user