Skip to content

Commit

Permalink
Address review comments 2.
Browse files Browse the repository at this point in the history
  • Loading branch information
ishan16696 committed Feb 10, 2023
1 parent 4478894 commit 423743f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions pkg/snapshot/snapshotter/snapshotter.go
Original file line number Diff line number Diff line change
Expand Up @@ -793,11 +793,11 @@ func (ssr *Snapshotter) GetFullSnapshotMaxTimeWindow(fullSnapScheduleSpec string
return defaultFullSnapMaxTimeWindow
}

if schedule[dayOfMonth] == "*" && schedule[dayOfWeek] == "*" && !strings.Contains(schedule[hour], "/") {
return defaultFullSnapMaxTimeWindow
} else if schedule[dayOfWeek] != "*" {
if schedule[dayOfWeek] != "*" {
return defaultFullSnapMaxTimeWindow * 7
} else if schedule[dayOfMonth] == "*" && schedule[dayOfWeek] == "*" && strings.Contains(schedule[hour], "/") {
}

if schedule[dayOfMonth] == "*" && schedule[dayOfWeek] == "*" && strings.Contains(schedule[hour], "/") {
if timeWindow, err := strconv.ParseFloat(schedule[hour][strings.Index(schedule[hour], "/")+1:], 64); err == nil {
return timeWindow
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/snapshot/snapshotter/snapshotter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ var _ = Describe("Snapshotter", func() {
})
})

Describe("Scenarios to take full-snapshot during startup of backup-restore", func() {
FDescribe("Scenarios to take full-snapshot during startup of backup-restore", func() {
var (
ssr *Snapshotter
currentMin int
Expand Down Expand Up @@ -696,7 +696,7 @@ var _ = Describe("Snapshotter", func() {
})
})

Describe("Scenarios to get maximum time window for full snapshot", func() {
FDescribe("Scenarios to get maximum time window for full snapshot", func() {
var (
ssr *Snapshotter
currentMin int
Expand Down

0 comments on commit 423743f

Please sign in to comment.