File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ import (
4343 "google.golang.org/grpc/connectivity"
4444)
4545
46- const DCS_CALL_TIMEOUT = 10 * time .Second
46+ const DCS_DIAL_TIMEOUT = 2 * time .Second
4747
4848type Plugin struct {
4949 dcsHost string
@@ -76,7 +76,7 @@ func (p *Plugin) GetName() string {
7676
7777func (p * Plugin ) Init (instanceId string ) error {
7878 if p .dcsClient == nil {
79- callTimeout := DCS_CALL_TIMEOUT
79+ callTimeout := DCS_DIAL_TIMEOUT
8080 cxt , cancel := context .WithTimeout (context .Background (), callTimeout )
8181 p .dcsClient = NewClient (cxt , cancel , viper .GetString ("dcsServiceEndpoint" ))
8282 if p .dcsClient == nil {
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ import (
4343 "google.golang.org/grpc/connectivity"
4444)
4545
46- const DDSCHED_CALL_TIMEOUT = 10 * time .Second
46+ const DDSCHED_DIAL_TIMEOUT = 2 * time .Second
4747
4848
4949type Plugin struct {
@@ -82,7 +82,7 @@ func (p *Plugin) GetName() string {
8282
8383func (p * Plugin ) Init (_ string ) error {
8484 if p .ddSchedClient == nil {
85- callTimeout := DDSCHED_CALL_TIMEOUT
85+ callTimeout := DDSCHED_DIAL_TIMEOUT
8686 cxt , cancel := context .WithTimeout (context .Background (), callTimeout )
8787 p .ddSchedClient = NewClient (cxt , cancel , viper .GetString ("ddSchedulerEndpoint" ))
8888 if p .ddSchedClient == nil {
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ import (
3939 "github.com/spf13/viper"
4040)
4141
42- const ODC_CALL_TIMEOUT = 10 * time .Second
42+ const ODC_DIAL_TIMEOUT = 2 * time .Second
4343
4444
4545type Plugin struct {
@@ -73,7 +73,7 @@ func (p *Plugin) GetName() string {
7373
7474func (p * Plugin ) Init (_ string ) error {
7575 if p .odcClient == nil {
76- callTimeout := ODC_CALL_TIMEOUT
76+ callTimeout := ODC_DIAL_TIMEOUT
7777 cxt , cancel := context .WithTimeout (context .Background (), callTimeout )
7878 p .odcClient = NewClient (cxt , cancel , viper .GetString ("odcEndpoint" ))
7979 if p .odcClient == nil {
You can’t perform that action at this time.
0 commit comments