Skip to content

Commit

Permalink
fix: delete active jobs right away when job finishes even when TTLSec…
Browse files Browse the repository at this point in the history
…ondsAfterFinished is set
  • Loading branch information
CecileRobertMichon committed Aug 27, 2024
1 parent 2dcc751 commit c3581cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/controllers/jobset_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,13 @@ func (r *JobSetReconciler) reconcile(ctx context.Context, js *jobset.JobSet, upd
log.Error(err, "executing ttl after finished policy")
return ctrl.Result{}, err
}
if requeueAfter > 0 {
return ctrl.Result{RequeueAfter: requeueAfter}, nil
}
if err := r.deleteJobs(ctx, ownedJobs.active); err != nil {
log.Error(err, "deleting jobs")
return ctrl.Result{}, err
}
if requeueAfter > 0 {
return ctrl.Result{RequeueAfter: requeueAfter}, nil
}
return ctrl.Result{}, nil
}

Expand Down

0 comments on commit c3581cb

Please sign in to comment.