Skip to content

Commit

Permalink
fix: check latestMoverStatus.Result instead of it being nil
Browse files Browse the repository at this point in the history
Signed-off-by: Devin Buhl <devin@buhl.casa>
  • Loading branch information
onedr0p committed Jul 27, 2023
1 parent d314308 commit da6cadf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion controllers/mover/rclone/mover.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func (m *Mover) ensureJob(ctx context.Context, dataPVC *corev1.PersistentVolumeC
if m.paused {
parallelism = int32(0)
}
if !m.isImmediate && m.latestMoverStatus == nil {
if !m.isImmediate && m.latestMoverStatus.Result == "" {
parallelism = int32(0)
}
job.Spec.Parallelism = &parallelism
Expand Down
2 changes: 1 addition & 1 deletion controllers/mover/restic/mover.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ func (m *Mover) ensureJob(ctx context.Context, cachePVC *corev1.PersistentVolume
if m.paused {
parallelism = int32(0)
}
if !m.isImmediate && m.latestMoverStatus == nil {
if !m.isImmediate && m.latestMoverStatus.Result == "" {
parallelism = int32(0)
}
job.Spec.Parallelism = &parallelism
Expand Down
2 changes: 1 addition & 1 deletion controllers/mover/rsync/mover.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ func (m *Mover) ensureJob(ctx context.Context, dataPVC *corev1.PersistentVolumeC
if m.paused {
parallelism = int32(0)
}
if !m.isImmediate && m.latestMoverStatus == nil {
if !m.isImmediate && m.latestMoverStatus.Result == "" {
parallelism = int32(0)
}
job.Spec.Parallelism = &parallelism
Expand Down
2 changes: 1 addition & 1 deletion controllers/mover/rsynctls/mover.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ func (m *Mover) ensureJob(ctx context.Context, dataPVC *corev1.PersistentVolumeC
if m.paused {
parallelism = int32(0)
}
if !m.isImmediate && m.latestMoverStatus == nil {
if !m.isImmediate && m.latestMoverStatus.Result == "" {
parallelism = int32(0)
}
job.Spec.Parallelism = &parallelism
Expand Down

0 comments on commit da6cadf

Please sign in to comment.