Finalize reliability configs
This commit is contained in:
@@ -22,6 +22,7 @@ type ConfigInterface interface {
|
||||
ShouldForceIPv6() bool
|
||||
GetUnrestrictWorkers() int
|
||||
GetReleaseUnrestrictAfterMs() int
|
||||
GetRateLimitSleepSeconds() int
|
||||
}
|
||||
|
||||
type ZurgConfig struct {
|
||||
@@ -32,6 +33,7 @@ type ZurgConfig struct {
|
||||
NumOfWorkers int `yaml:"concurrent_workers"`
|
||||
UnrestrictWorkers int `yaml:"unrestrict_workers"`
|
||||
ReleaseUnrestrictAfterMs int `yaml:"release_unrestrict_after_ms"`
|
||||
RateLimitSleepSeconds int `yaml:"rate_limit_sleep_secs"`
|
||||
RefreshEverySeconds int `yaml:"check_for_changes_every_secs"`
|
||||
CanRepair bool `yaml:"enable_repair"`
|
||||
OnLibraryUpdate string `yaml:"on_library_update"`
|
||||
@@ -135,3 +137,10 @@ func (z *ZurgConfig) GetReleaseUnrestrictAfterMs() int {
|
||||
}
|
||||
return z.ReleaseUnrestrictAfterMs
|
||||
}
|
||||
|
||||
func (z *ZurgConfig) GetRateLimitSleepSeconds() int {
|
||||
if z.RateLimitSleepSeconds == 0 {
|
||||
return 4
|
||||
}
|
||||
return z.RateLimitSleepSeconds
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user