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 fd18b36
Showing 1 changed file with 4 additions and 4 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

0 comments on commit fd18b36

Please sign in to comment.