From f2381554f92fa6976f13edf0d6c6a6644682a12b Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Mon, 22 Jan 2018 19:45:33 +0100 Subject: [PATCH] Use URL defined in config to fetch replication state --- update/state/state.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/update/state/state.go b/update/state/state.go index b0ec965..d6dd9f8 100644 --- a/update/state/state.go +++ b/update/state/state.go @@ -12,6 +12,7 @@ import ( "strings" "time" + "github.com/omniscale/imposm3/config" "github.com/omniscale/imposm3/logging" "github.com/omniscale/imposm3/parser/pbf" ) @@ -92,7 +93,10 @@ func FromPbf(filename string, before time.Duration) (*DiffState, error) { timestamp = fstat.ModTime() } - replicationUrl := "https://planet.openstreetmap.org/replication/minute/" + replicationUrl := config.BaseOptions.ReplicationUrl + if replicationUrl == "" { + replicationUrl = "https://planet.openstreetmap.org/replication/minute/" + } seq := estimateSequence(replicationUrl, timestamp) if seq == 0 {