initial rendering disable option
This commit is contained in:
parent
ce4ac4dfc9
commit
a48e2c2678
@ -13,6 +13,7 @@ type Config struct {
|
|||||||
Port int `json:"port"`
|
Port int `json:"port"`
|
||||||
EnablePrometheus bool `json:"enableprometheus"`
|
EnablePrometheus bool `json:"enableprometheus"`
|
||||||
EnableRendering bool `json:"enablerendering"`
|
EnableRendering bool `json:"enablerendering"`
|
||||||
|
EnableInitialRendering bool `json:"enableinitialrendering"`
|
||||||
EnableTransparency bool `json:"enabletransparency"`
|
EnableTransparency bool `json:"enabletransparency"`
|
||||||
Webdev bool `json:"webdev"`
|
Webdev bool `json:"webdev"`
|
||||||
WebApi *WebApiConfig `json:"webapi"`
|
WebApi *WebApiConfig `json:"webapi"`
|
||||||
@ -140,6 +141,7 @@ func ParseConfig(filename string) (*Config, error) {
|
|||||||
Port: 8080,
|
Port: 8080,
|
||||||
EnableRendering: true,
|
EnableRendering: true,
|
||||||
EnablePrometheus: true,
|
EnablePrometheus: true,
|
||||||
|
EnableInitialRendering: true,
|
||||||
EnableTransparency: true,
|
EnableTransparency: true,
|
||||||
Webdev: false,
|
Webdev: false,
|
||||||
WebApi: &webapi,
|
WebApi: &webapi,
|
||||||
|
@ -13,9 +13,11 @@ func Job(ctx *app.App) {
|
|||||||
ctx.Settings.SetInt64(settings.SETTING_LAST_MTIME, time.Now().Unix())
|
ctx.Settings.SetInt64(settings.SETTING_LAST_MTIME, time.Now().Unix())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ctx.Config.EnableInitialRendering {
|
||||||
if ctx.Settings.GetBool(settings.SETTING_INITIAL_RUN, true) {
|
if ctx.Settings.GetBool(settings.SETTING_INITIAL_RUN, true) {
|
||||||
initialRender(ctx)
|
initialRender(ctx)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
incrementalRender(ctx)
|
incrementalRender(ctx)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user