25 lines
479 B
Go
Raw Normal View History

2019-01-24 07:52:25 +01:00
package tilerendererjob
import (
"mapserver/app"
2019-02-07 18:44:40 +01:00
"mapserver/settings"
2019-02-22 15:24:10 +01:00
"time"
2019-01-24 07:52:25 +01:00
)
func Job(ctx *app.App) {
2019-02-22 15:24:10 +01:00
lastMtime := ctx.Settings.GetInt64(settings.SETTING_LAST_MTIME, 0)
if lastMtime == 0 {
//mark current time as last incremental render point
ctx.Settings.SetInt64(settings.SETTING_LAST_MTIME, time.Now().Unix())
}
2019-02-07 18:44:40 +01:00
if ctx.Settings.GetBool(settings.SETTING_INITIAL_RUN, true) {
2019-02-20 10:10:00 +01:00
initialRender(ctx)
2019-01-24 15:56:37 +01:00
}
2019-01-24 07:52:25 +01:00
2019-02-20 10:10:00 +01:00
incrementalRender(ctx)
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
}