|
|
@@ -74,12 +74,13 @@ func (ai *AthenaIntegration) GetCloudCost(start, end time.Time) (*opencost.Cloud
|
|
|
|
|
|
func (ai *AthenaIntegration) RefreshStatus() cloud.ConnectionStatus {
|
|
|
end := time.Now().UTC().Truncate(timeutil.Day)
|
|
|
- start := end.Add(-7 * timeutil.Day)
|
|
|
+ start := end.Add(-3 * timeutil.Day) // lookback 72 hours
|
|
|
|
|
|
// getCloudCost already sets ConnectionStatus in the event there is no error, so we don't need to handle the positive
|
|
|
// case here
|
|
|
_, err := ai.getCloudCost(start, end, 1)
|
|
|
if err != nil {
|
|
|
+ log.Errorf("AthenaIntegration: RefreshStatus: error while refreshing status: %s", err.Error())
|
|
|
ai.ConnectionStatus = cloud.FailedConnection
|
|
|
}
|
|
|
|