mapserver/server/tilerendererjob/job.go

26 lines
400 B
Go
Raw Normal View History

2019-01-24 09:52:25 +03:00
package tilerendererjob
import (
"mapserver/app"
"mapserver/coords"
)
func Job(ctx *app.App) {
rstate := ctx.Config.RenderState
jobs := make(chan *coords.TileCoords, ctx.Config.RenderingQueue)
for i := 0; i < ctx.Config.RenderingJobs; i++ {
go worker(ctx, jobs)
}
2019-01-24 17:56:37 +03:00
if rstate.InitialRun {
initialRender(ctx, jobs)
}
2019-01-24 09:52:25 +03:00
2019-01-24 17:56:37 +03:00
incrementalRender(ctx, jobs)
2019-01-24 09:52:25 +03:00
2019-01-25 19:57:38 +03:00
panic("render job interrupted!")
2019-01-24 09:52:25 +03:00
}