Skip to content

Commit 3283a51

Browse files
committed
refactor: Add missing ExecutionTimeout variable
1 parent e45e01d commit 3283a51

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

main.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ import (
1919
const (
2020
AnnotationTTL = "k8s-ttl-controller.twin.sh/ttl"
2121

22-
MaximumFailedExecutionBeforePanic = 10 // Maximum number of allowed failed executions before panicking
23-
ExecutionInterval = 5 * time.Minute // Interval between each reconciliation
22+
MaximumFailedExecutionBeforePanic = 10 // Maximum number of allowed failed executions before panicking
23+
ExecutionTimeout = 10 * time.Minute // Maximum time for each reconciliation before timing out.
24+
ExecutionInterval = 5 * time.Minute // Interval between each reconciliation
2425
)
2526

2627
var (
@@ -68,7 +69,7 @@ func Reconcile(kubernetesClient kubernetes.Interface, dynamicClient dynamic.Inte
6869
timeout := make(chan bool, 1)
6970
result := make(chan bool, 1)
7071
go func() {
71-
time.Sleep(10 * time.Minute)
72+
time.Sleep(ExecutionTimeout)
7273
timeout <- true
7374
}()
7475
go func() {

0 commit comments

Comments
 (0)