Skip to content

Commit

Permalink
Merge pull request #56 from deepfence/issue-55
Browse files Browse the repository at this point in the history
changes related to fetcher service #55
  • Loading branch information
ramanan-ravi authored Apr 14, 2022
2 parents 909bac3 + 7db75bd commit 810fdb8
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions server/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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) {
Expand Down

0 comments on commit 810fdb8

Please sign in to comment.