Use URL defined in config to fetch replication state

master
Yohan Boniface 2018-01-22 19:45:33 +01:00
parent cfb1be89d1
commit f2381554f9
1 changed files with 5 additions and 1 deletions

View File

@ -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 {