mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-07 11:27:50 +00:00
change flag name to usage-interval
This commit is contained in:
parent
42067237f7
commit
ae6687e71b
3 changed files with 6 additions and 6 deletions
|
|
@ -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")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue