- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for IsJobFinished (0.15 sec)
-
pkg/controller/job/util/utils.go
return true, c.Type } } return false, "" } // IsJobFinished checks whether the given Job has finished execution. // It does not discriminate between successful and failed terminations. func IsJobFinished(j *batch.Job) bool { isFinished, _ := FinishedCondition(j) return isFinished }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 07 09:27:46 UTC 2024 - 1.5K bytes - Viewed (0) -
pkg/controller/job/util/utils_test.go
for name, test := range tests { t.Run(name, func(t *testing.T) { job := &batch.Job{ Status: batch.JobStatus{ Conditions: test.conditions, }, } isJobFinished, conditionType := FinishedCondition(job) if isJobFinished != test.wantJobFinished { if test.wantJobFinished { t.Error("Expected the job to be finished") } else { t.Error("Expected the job to be unfinished") } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 07 09:27:46 UTC 2024 - 4.7K bytes - Viewed (0) -
pkg/registry/batch/job/strategy.go
// down a Job. isIndexed := ptr.Deref(newJob.Spec.CompletionMode, batch.NonIndexedCompletion) == batch.IndexedCompletion isJobFinishedChanged := batchvalidation.IsJobFinished(oldJob) != batchvalidation.IsJobFinished(newJob) isJobCompleteChanged := batchvalidation.IsJobComplete(oldJob) != batchvalidation.IsJobComplete(newJob) isJobFailedChanged := batchvalidation.IsJobFailed(oldJob) != batchvalidation.IsJobFailed(newJob)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 08 16:43:24 UTC 2024 - 18.4K bytes - Viewed (0) -
pkg/apis/batch/validation/validation.go
} } isJobFinished := IsJobFinished(job) if opts.RejectFinishedJobWithActivePods { if status.Active > 0 && isJobFinished { allErrs = append(allErrs, field.Invalid(fldPath.Child("active"), status.Active, "active>0 is invalid for finished job")) } } if opts.RejectFinishedJobWithoutStartTime { if status.StartTime == nil && isJobFinished {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 08 16:43:24 UTC 2024 - 51.2K bytes - Viewed (0) -
pkg/controller/ttlafterfinished/ttlafterfinished_controller.go
tc.enqueueAfter(job, *t) return nil, nil } // needsCleanup checks whether a Job has finished and has a TTL set. func needsCleanup(j *batch.Job) bool { return j.Spec.TTLSecondsAfterFinished != nil && jobutil.IsJobFinished(j) } func getFinishAndExpireTime(j *batch.Job) (*time.Time, *time.Time, error) { if !needsCleanup(j) { return nil, nil, fmt.Errorf("job %s/%s should not be cleaned up", j.Namespace, j.Name) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 07 23:59:28 UTC 2024 - 10.4K bytes - Viewed (0) -
pkg/controller/cronjob/cronjob_controllerv2.go
updateStatus := false childrenJobs := make(map[types.UID]bool) for _, j := range jobs { childrenJobs[j.ObjectMeta.UID] = true found := inActiveList(cronJob, j.ObjectMeta.UID) if !found && !jobutil.IsJobFinished(j) { cjCopy, err := jm.cronJobControl.GetCronJob(ctx, cronJob.Namespace, cronJob.Name) if err != nil { return nil, updateStatus, err } if inActiveList(cjCopy, j.ObjectMeta.UID) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu May 09 03:34:25 UTC 2024 - 29.2K bytes - Viewed (0) -
pkg/controller/job/job_controller.go
if hasFinalizer { jm.enqueueOrphanPod(pod) } return } job := jm.resolveControllerRef(pod.Namespace, controllerRef) if job == nil || util.IsJobFinished(job) { // syncJob will not remove this finalizer. if hasFinalizer { jm.enqueueOrphanPod(pod) } return } jobKey, err := controller.KeyFunc(job) if err != nil { return }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jun 10 23:56:37 UTC 2024 - 77.6K bytes - Viewed (0)