Skip to content

Commit

Permalink
check if one backup in range
Browse files Browse the repository at this point in the history
  • Loading branch information
korotkov-aerospike committed Dec 21, 2023
1 parent a8cc8a8 commit 735ea4d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/service/backup_backend_s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ func (s *BackupBackendS3) FullBackupList(from, to int64) ([]model.BackupDetails,
if s.fullBackupInProgress.Load() {
return []model.BackupDetails{}, nil
}
if lastRun.UnixMilli() < from || lastRun.UnixMilli() >= to {
return []model.BackupDetails{}, nil
}
return []model.BackupDetails{{
Key: ptr.String(s3prefix + backupFolder),
LastModified: &lastRun,
Expand Down

0 comments on commit 735ea4d

Please sign in to comment.