Skip to content

Commit

Permalink
more minor scheduling bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
garethgeorge committed Aug 27, 2024
1 parent d91c0a5 commit f5a9ca8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/orchestrator/tasks/taskbackup.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (t *BackupTask) Next(now time.Time, runner TaskRunner) (ScheduledTask, erro
if op.Status == v1.OperationStatus_STATUS_PENDING || op.Status == v1.OperationStatus_STATUS_SYSTEM_CANCELLED {
return nil
}
if _, ok := op.Op.(*v1.Operation_OperationBackup); ok {
if _, ok := op.Op.(*v1.Operation_OperationBackup); ok && op.UnixTimeEndMs != 0 {
lastRan = time.Unix(0, op.UnixTimeEndMs*int64(time.Millisecond))
return oplog.ErrStopIteration
}
Expand Down
2 changes: 1 addition & 1 deletion internal/orchestrator/tasks/taskcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (t *CheckTask) Next(now time.Time, runner TaskRunner) (ScheduledTask, error
if op.Status == v1.OperationStatus_STATUS_PENDING || op.Status == v1.OperationStatus_STATUS_SYSTEM_CANCELLED {
return nil
}
if _, ok := op.Op.(*v1.Operation_OperationCheck); ok {
if _, ok := op.Op.(*v1.Operation_OperationCheck); ok && op.UnixTimeEndMs != 0 {
lastRan = time.Unix(0, op.UnixTimeEndMs*int64(time.Millisecond))
return oplog.ErrStopIteration
}
Expand Down
2 changes: 1 addition & 1 deletion internal/orchestrator/tasks/taskprune.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (t *PruneTask) Next(now time.Time, runner TaskRunner) (ScheduledTask, error
if op.Status == v1.OperationStatus_STATUS_PENDING || op.Status == v1.OperationStatus_STATUS_SYSTEM_CANCELLED {
return nil
}
if _, ok := op.Op.(*v1.Operation_OperationPrune); ok {
if _, ok := op.Op.(*v1.Operation_OperationPrune); ok && op.UnixTimeEndMs != 0 {
lastRan = time.Unix(0, op.UnixTimeEndMs*int64(time.Millisecond))
return oplog.ErrStopIteration
}
Expand Down

0 comments on commit f5a9ca8

Please sign in to comment.