Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: Josef Karasek <josef@kedify.io>
  • Loading branch information
josefkarasek committed Jun 10, 2024
1 parent eb73bba commit 84311c7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions controllers/keda/scaledjob_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,9 @@ func (r *ScaledJobReconciler) deletePreviousVersionScaleJobs(ctx context.Context
if jobGen, ok := job.Annotations["scaledjob.keda.sh/generation"]; !ok {
// delete Jobs that don't have the generation annotation
jobIndexes = append(jobIndexes, i)
} else {
} else if jobGen != scaledJobGeneration {
// delete Jobs that have a different generation annotation
if jobGen != scaledJobGeneration {
jobIndexes = append(jobIndexes, i)
}
jobIndexes = append(jobIndexes, i)
}
}

Expand Down

0 comments on commit 84311c7

Please sign in to comment.