1
0
forked from MTSR/mapserver
This commit is contained in:
Thomas Rudin 2019-02-10 18:38:30 +01:00
parent 13aade9bcc
commit bd630ef7d0
3 changed files with 11 additions and 0 deletions

View File

@ -30,6 +30,10 @@ func getKey(pos *coords.TileCoords) []byte {
return []byte(fmt.Sprintf("%d/%d/%d/%d", pos.X, pos.Y, pos.Zoom, pos.LayerId))
}
func (this *TileDB) GC() {
this.db.RunValueLogGC(0.7)
}
func (this *TileDB) GetTile(pos *coords.TileCoords) ([]byte, error) {
var tile []byte
err := this.db.View(func(txn *badger.Txn) error {

View File

@ -60,5 +60,9 @@ func incrementalRender(ctx *app.App, jobs chan *coords.TileCoords) {
"secondsDiff": millisDiff / 1000,
}
logrus.WithFields(fields).Info("incremental rendering")
//tile gc
ctx.TileDB.GC()
}
}

View File

@ -96,5 +96,8 @@ func initialRender(ctx *app.App, jobs chan *coords.TileCoords) {
}
logrus.WithFields(fields).Info("Initial rendering")
//tile gc
ctx.TileDB.GC()
}
}