1
0
forked from MTSR/mapserver

initial rendering disable option

This commit is contained in:
Thomas Rudin 2019-03-29 21:05:53 +01:00
parent ce4ac4dfc9
commit a48e2c2678
2 changed files with 30 additions and 26 deletions

View File

@ -13,6 +13,7 @@ type Config struct {
Port int `json:"port"`
EnablePrometheus bool `json:"enableprometheus"`
EnableRendering bool `json:"enablerendering"`
EnableInitialRendering bool `json:"enableinitialrendering"`
EnableTransparency bool `json:"enabletransparency"`
Webdev bool `json:"webdev"`
WebApi *WebApiConfig `json:"webapi"`
@ -140,6 +141,7 @@ func ParseConfig(filename string) (*Config, error) {
Port: 8080,
EnableRendering: true,
EnablePrometheus: true,
EnableInitialRendering: true,
EnableTransparency: true,
Webdev: false,
WebApi: &webapi,

View File

@ -13,9 +13,11 @@ func Job(ctx *app.App) {
ctx.Settings.SetInt64(settings.SETTING_LAST_MTIME, time.Now().Unix())
}
if ctx.Config.EnableInitialRendering {
if ctx.Settings.GetBool(settings.SETTING_INITIAL_RUN, true) {
initialRender(ctx)
}
}
incrementalRender(ctx)