#11607 Cleanup time of temporary files is now configurable
This commit is contained in:
@@ -20,6 +20,7 @@ import (
|
||||
|
||||
"github.com/grafana/grafana/pkg/log"
|
||||
"github.com/grafana/grafana/pkg/util"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Scheme string
|
||||
@@ -195,6 +196,8 @@ type Cfg struct {
|
||||
PhantomDir string
|
||||
RendererUrl string
|
||||
DisableBruteForceLoginProtection bool
|
||||
|
||||
TempDataLifetime time.Duration
|
||||
}
|
||||
|
||||
type CommandLineArgs struct {
|
||||
@@ -637,6 +640,9 @@ func (cfg *Cfg) Load(args *CommandLineArgs) error {
|
||||
cfg.RendererUrl = renderSec.Key("server_url").String()
|
||||
cfg.ImagesDir = filepath.Join(DataPath, "png")
|
||||
cfg.PhantomDir = filepath.Join(HomePath, "tools/phantomjs")
|
||||
cfg.TempDataLifetime = iniFile.Section("paths").Key("temp_data_lifetime").MustDuration(
|
||||
time.Duration(time.Second*3600*24),
|
||||
)
|
||||
|
||||
analytics := iniFile.Section("analytics")
|
||||
ReportingEnabled = analytics.Key("reporting_enabled").MustBool(true)
|
||||
|
||||
Reference in New Issue
Block a user