Extend Namespace dispatcher timeout
This commit is contained in:
parent
4d7c19e593
commit
4f8d58965b
7 changed files with 6 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
listen: ":8090"
|
||||
dispatcher:
|
||||
url: "http://localhost:8080"
|
||||
timeout: "2h"
|
||||
|
||||
instances:
|
||||
- name: burrow
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ listen: "127.0.0.1:8090"
|
|||
|
||||
dispatcher:
|
||||
url: "http://127.0.0.1:8080"
|
||||
timeout: "2h"
|
||||
|
||||
instances:
|
||||
- name: burrow
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ func LoadConfig(path string) (Config, error) {
|
|||
return Config{}, fmt.Errorf("dispatcher.url is required")
|
||||
}
|
||||
if cfg.Dispatcher.Timeout.Duration == 0 {
|
||||
cfg.Dispatcher.Timeout = config.Duration{Duration: 15 * time.Second}
|
||||
cfg.Dispatcher.Timeout = config.Duration{Duration: 2 * time.Hour}
|
||||
}
|
||||
if len(cfg.Instances) == 0 {
|
||||
return Config{}, fmt.Errorf("at least one instance must be configured")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue