1
0
forked from MTSR/mapserver
mapserver/server/tilerendererjob/worker.go
NatureFreshMilk 2ec79a16cd tiledb on fs
2019-02-21 11:16:01 +01:00

30 lines
531 B
Go

package tilerendererjob
import (
"github.com/sirupsen/logrus"
"mapserver/app"
"mapserver/coords"
)
func worker(ctx *app.App, coords <-chan *coords.TileCoords, done chan bool) {
for tc := range coords {
//render tile
fields := logrus.Fields{
"X": tc.X,
"Y": tc.Y,
"Zoom": tc.Zoom,
"LayerId": tc.LayerId,
"prefix": "tilerenderjob",
}
logrus.WithFields(fields).Debug("Tile render job tile")
_, err := ctx.Tilerenderer.Render(tc)
if err != nil {
panic(err)
}
}
done <- true
}