Skip to content

Commit c9355df

Browse files
committed
Added missing comment.
1 parent 00f837e commit c9355df

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • operator/controllers/execution/scans

‎operator/controllers/execution/scans/job.go‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ const (
1717
unknown jobCompletionType = "Unknown"
1818
)
1919

20-
func allJobsCompleted(jobs *batch.JobList) jobCompletionType {
20+
// checkIfAllJobsCompleted returns `completed` if all jobs of the given jobList are in a successful state, incompleted otherwise.
21+
func checkIfAllJobsCompleted(jobs *batch.JobList) jobCompletionType {
2122
hasCompleted := true
2223

2324
for _, job := range jobs.Items {
@@ -61,5 +62,5 @@ func (r *ScanReconciler) checkIfJobIsCompleted(scan *executionv1.Scan, labels cl
6162

6263
r.Log.V(9).Info("Got related jobs", "count", len(jobs.Items))
6364

64-
return allJobsCompleted(jobs), nil
65+
return checkIfAllJobsCompleted(jobs), nil
6566
}

0 commit comments

Comments
 (0)