From 7db75bd417c23295135e4921b5373525e909e70f Mon Sep 17 00:00:00 2001 From: shubhamjain32 Date: Thu, 14 Apr 2022 11:44:42 +0530 Subject: [PATCH] changes related to fetcher service #55 --- server/http.go | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/server/http.go b/server/http.go index 9e739c8..f9a76cc 100644 --- a/server/http.go +++ b/server/http.go @@ -19,16 +19,16 @@ import ( ) const ( - scanStatusComplete = "COMPLETE" - scanStatusError = "ERROR" - defaultScanConcurrency = 5 + scanStatusComplete = "COMPLETE" + scanStatusError = "ERROR" + defaultScanConcurrency = 5 + secretScanIndexName = "secret-scan" + secretScanLogsIndexName = "secret-scan-logs" ) var ( - scanConcurrency int - httpScanWorkerPool *tunny.Pool - secretScanIndexName = "secret-scan" - secretScanLogsIndexName = "secret-scan-logs" + scanConcurrency int + httpScanWorkerPool *tunny.Pool ) type imageParameters struct { @@ -44,12 +44,6 @@ func init() { scanConcurrency = defaultScanConcurrency } httpScanWorkerPool = tunny.NewFunc(scanConcurrency, processImageWrapper) - - customerUniqueId := os.Getenv("CUSTOMER_UNIQUE_ID") - if customerUniqueId != "" { - secretScanIndexName += fmt.Sprintf("-%s", customerUniqueId) - secretScanLogsIndexName += fmt.Sprintf("-%s", customerUniqueId) - } } func runSecretScan(writer http.ResponseWriter, request *http.Request) {