add exponential backoff to room service check retries (#2462)

This commit is contained in:
Paul Wells
2024-02-07 19:35:58 -08:00
committed by GitHub
parent 89e58b150e
commit fd35c9edfc
4 changed files with 23 additions and 22 deletions
+7 -4
View File
@@ -297,19 +297,22 @@ type IngressConfig struct {
type SIPConfig struct {
}
// not exposed to YAML
type APIConfig struct {
// amount of time to wait for API to execute, default 2s
ExecutionTimeout time.Duration
ExecutionTimeout time.Duration `yaml:"execution_timeout,omitempty"`
// amount of time to wait before checking for operation complete
CheckInterval time.Duration
// min amount of time to wait before checking for operation complete
CheckInterval time.Duration `yaml:"check_interval,omitempty"`
// max amount of time to wait before checking for operation complete
MaxCheckInterval time.Duration `yaml:"max_check_interval,omitempty"`
}
func DefaultAPIConfig() APIConfig {
return APIConfig{
ExecutionTimeout: 2 * time.Second,
CheckInterval: 100 * time.Millisecond,
MaxCheckInterval: 300 * time.Second,
}
}