mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 17:15:56 +00:00
Allow usage-duty-cycle < 20%, and 0 disables
This commit is contained in:
parent
153dea6e1d
commit
b7898b0a22
2 changed files with 3 additions and 4 deletions
3
api.go
3
api.go
|
|
@ -1067,9 +1067,6 @@ func (api *API) RefreshUsageCache(dutyCycle float64) {
|
|||
trigger := make(chan bool)
|
||||
defer close(trigger)
|
||||
|
||||
if dutyCycle <= 0 {
|
||||
dutyCycle = 20
|
||||
}
|
||||
multiplier := 100/dutyCycle - 1
|
||||
|
||||
api.usageCache = &usageCache{
|
||||
|
|
|
|||
|
|
@ -277,7 +277,9 @@ func (m *Command) Start() (err error) {
|
|||
}
|
||||
}
|
||||
|
||||
go m.API.RefreshUsageCache(m.Config.UsageDutyCycle)
|
||||
if m.Config.UsageDutyCycle > 0 {
|
||||
go m.API.RefreshUsageCache(m.Config.UsageDutyCycle)
|
||||
}
|
||||
|
||||
_ = testhook.Opened(pilosa.NewAuditor(), m, nil)
|
||||
close(m.Started)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue