We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 871cb9c commit c7420deCopy full SHA for c7420de
pkg/metric/repository.go
@@ -3,6 +3,7 @@ package metric
3
import (
4
"context"
5
"fmt"
6
+ "strings"
7
"time"
8
9
"github.com/tencentyun/tencentcloud-exporter/pkg/util"
@@ -166,7 +167,7 @@ func (repo *TcmMetricRepositoryImpl) getMonitorDataWithRetry(
166
167
for i := 0; i < 3; i++ {
168
resp, err := monitorClient.GetMonitorData(request)
169
if err != nil {
- if err.Error() == context.DeadlineExceeded.Error() {
170
+ if strings.Contains(err.Error(), context.DeadlineExceeded.Error()) {
171
lastErr = err
172
continue
173
}
0 commit comments