diff --git a/ctl/server.go b/ctl/server.go index ce9796b13..250902fd1 100644 --- a/ctl/server.go +++ b/ctl/server.go @@ -111,6 +111,6 @@ func BuildServerFlags(cmd *cobra.Command, srv *server.Command) { flags.Uint32Var(&srv.Config.Postgres.MaxStartupSize, "postgres.max-startup-size", srv.Config.Postgres.MaxStartupSize, "Maximum acceptable size of a postgres startup packet, in bytes. (set 0 to disable)") flags.Uint16Var(&srv.Config.Postgres.ConnectionLimit, "postgres.connection-limit", srv.Config.Postgres.ConnectionLimit, "Maximum number of simultaneous postgres connections to allow. (set 0 to disable)") - // Disk Usage refresh rate in minutes for ui/usage http endpoint - flags.DurationVar((*time.Duration)(&srv.Config.DiskUsage.Interval), "disk-usage-interval", time.Duration(srv.Config.DiskUsage.Interval), "Number in minutes between recalculations of disk usage cache") + // Disk/Memory Usage refresh rate in minutes for ui/usage http endpoint + flags.DurationVar((*time.Duration)(&srv.Config.Usage.Interval), "usage-interval", time.Duration(srv.Config.Usage.Interval), "Number in minutes between recalculations of disk/memory usage cache") } diff --git a/server/config.go b/server/config.go index 837226b24..7871364db 100644 --- a/server/config.go +++ b/server/config.go @@ -226,8 +226,8 @@ type Config struct { LookupDBDSN string `toml:"lookup-db-dsn"` // Disk Usage refresh interval for ui/usage http endpoint - DiskUsage struct { - Interval toml.Duration `toml:"disk-usage-interval"` + Usage struct { + Interval toml.Duration `toml:"usage-interval"` } } @@ -364,7 +364,7 @@ func NewConfig() *Config { c.Etcd.PeerCertFile = "" c.Etcd.PeerKeyFile = "" - c.DiskUsage.Interval = toml.Duration(6 * 60 * time.Minute) // 6 hours + c.Usage.Interval = toml.Duration(6 * 60 * time.Minute) // 6 hours return c } diff --git a/server/server.go b/server/server.go index 5635d2089..a8d5ecfc4 100644 --- a/server/server.go +++ b/server/server.go @@ -277,7 +277,7 @@ func (m *Command) Start() (err error) { } } - go m.API.RefreshUsageCache(time.Duration(m.Config.DiskUsage.Interval)) + go m.API.RefreshUsageCache(time.Duration(m.Config.Usage.Interval)) _ = testhook.Opened(pilosa.NewAuditor(), m, nil) close(m.Started)