27 lines
442 B
Go
Raw Normal View History

2019-01-24 07:52:25 +01:00
package tilerendererjob
import (
"mapserver/app"
"mapserver/coords"
2019-02-07 18:44:40 +01:00
"mapserver/settings"
2019-01-24 07:52:25 +01:00
)
func Job(ctx *app.App) {
2019-02-08 14:25:07 +01:00
initMetrics()
2019-02-08 16:02:24 +01:00
2019-01-24 07:52:25 +01:00
jobs := make(chan *coords.TileCoords, ctx.Config.RenderingQueue)
for i := 0; i < ctx.Config.RenderingJobs; i++ {
go worker(ctx, jobs)
}
2019-02-07 18:44:40 +01:00
if ctx.Settings.GetBool(settings.SETTING_INITIAL_RUN, true) {
2019-01-24 15:56:37 +01:00
initialRender(ctx, jobs)
}
2019-01-24 07:52:25 +01:00
2019-01-24 15:56:37 +01:00
incrementalRender(ctx, jobs)
2019-01-24 07:52:25 +01:00
2019-01-25 17:57:38 +01:00
panic("render job interrupted!")
2019-01-24 07:52:25 +01:00
}