Skip to content

Commit

Permalink
use the same base for comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
floreks committed Sep 27, 2024
1 parent ea789da commit de48f6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/controller/upgradeinsights_cloudprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ func (in *EKSCloudProvider) fromInsightStatus(status *types.InsightStatus) *cons
}

func (in *EKSCloudProvider) fromClientStats(stats []types.ClientStat) *console.UpgradeInsightStatus {
const failedBeforeDuration = int64(24 * time.Hour)
const failedBeforeDuration = 24.0 // in hours
for _, stat := range stats {
if stat.LastRequestTime != nil && time.Now().Sub(*stat.LastRequestTime).Milliseconds() < failedBeforeDuration {
if stat.LastRequestTime != nil && time.Now().Sub(*stat.LastRequestTime).Hours() < failedBeforeDuration {
return lo.ToPtr(console.UpgradeInsightStatusFailed)
}
}
Expand Down

0 comments on commit de48f6a

Please sign in to comment.