- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for getRemainingTime (0.19 sec)
-
pkg/controller/job/backoff_utils.go
finishTime := p.DeletionTimestamp.Time.Add(-time.Duration(ptr.Deref(p.DeletionGracePeriodSeconds, 0)) * time.Second) return &finishTime } return nil } func (backoff backoffRecord) getRemainingTime(clock clock.WithTicker, defaultBackoff time.Duration, maxBackoff time.Duration) time.Duration { return getRemainingTimeForFailuresCount(clock, defaultBackoff, maxBackoff, backoff.failuresAfterLastSuccess, backoff.lastFailureTime)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jun 06 07:46:41 UTC 2024 - 8.3K bytes - Viewed (0) -
pkg/controller/job/backoff_utils_test.go
}, } for name, tc := range testCases { t.Run(name, func(t *testing.T) { fakeClock := clocktesting.NewFakeClock(tc.currentTime.Truncate(time.Second)) d := tc.backoffRecord.getRemainingTime(fakeClock, tc.defaultBackoff, tc.maxBackoff) if d.Seconds() != tc.wantDuration.Seconds() { t.Errorf("Expected value of duration %v; got %v", tc.wantDuration, d) } }) } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jun 06 07:46:41 UTC 2024 - 16.7K bytes - Viewed (0) -
pkg/controller/job/job_controller.go
var remainingTime time.Duration if !hasBackoffLimitPerIndex(job) { // we compute the global remaining time for pod creation when backoffLimitPerIndex is not used remainingTime = jobCtx.newBackoffRecord.getRemainingTime(jm.clock, DefaultJobPodFailureBackOff, MaxJobPodFailureBackOff) } if remainingTime > 0 { jm.enqueueSyncJobWithDelay(logger, job, remainingTime) return 0, metrics.JobSyncActionPodsCreated, nil }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jun 10 23:56:37 UTC 2024 - 77.6K bytes - Viewed (0)