Skip to content

Commit

Permalink
remove not used code
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Turrado <[email protected]>
  • Loading branch information
JorTurFer committed Jul 3, 2023
1 parent fd54946 commit 8582eae
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions cmd/adapter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"flag"
"fmt"
"os"
"time"

appsv1 "k8s.io/api/apps/v1"
"k8s.io/client-go/kubernetes/scheme"
Expand Down Expand Up @@ -56,7 +55,7 @@ var (
metricsServiceAddr string
)

func (a *Adapter) makeProvider(ctx context.Context, globalHTTPTimeout time.Duration) (provider.ExternalMetricsProvider, <-chan struct{}, error) {
func (a *Adapter) makeProvider(ctx context.Context) (provider.ExternalMetricsProvider, <-chan struct{}, error) {
scheme := scheme.Scheme
if err := appsv1.SchemeBuilder.AddToScheme(scheme); err != nil {
logger.Error(err, "failed to add apps/v1 scheme to runtime scheme")
Expand Down Expand Up @@ -197,19 +196,12 @@ func main() {

ctrl.SetLogger(logger)

// default to 3 seconds if they don't pass the env var
globalHTTPTimeoutMS, err := kedautil.ResolveOsEnvInt("KEDA_HTTP_DEFAULT_TIMEOUT", 3000)
if err != nil {
logger.Error(err, "Invalid KEDA_HTTP_DEFAULT_TIMEOUT")
return
}

err = printWelcomeMsg(cmd)
if err != nil {
return
}

kedaProvider, stopCh, err := cmd.makeProvider(ctx, time.Duration(globalHTTPTimeoutMS)*time.Millisecond)
kedaProvider, stopCh, err := cmd.makeProvider(ctx)
if err != nil {
logger.Error(err, "making provider")
return
Expand Down

0 comments on commit 8582eae

Please sign in to comment.