Skip to content

Commit

Permalink
Get rid of magic number
Browse files Browse the repository at this point in the history
  • Loading branch information
Mtze committed Sep 23, 2023
1 parent 0a3cdc3 commit c572474
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion HadesScheduler/kube/kube.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ import (
"k8s.io/client-go/tools/clientcmd"
)

const (
waitForNamespace = 5 * time.Second
)

type JobScheduler interface {
ScheduleJob(job payload.BuildJob) error
}
Expand Down Expand Up @@ -127,7 +131,7 @@ func createNamespace(clientset *kubernetes.Clientset, namespace string) (*corev1
}

// sleep for 5 seconds to give the namespace time to be created
time.Sleep(5 * time.Second)
time.Sleep(waitForNamespace)

return ns, nil
}
Expand Down

0 comments on commit c572474

Please sign in to comment.