From 5c1bb93068caee22ba00f47e323a16404de5a4ab Mon Sep 17 00:00:00 2001 From: zricethezav Date: Mon, 19 Feb 2018 14:32:35 -0600 Subject: [PATCH] default conc limit too high... whoops --- leaks.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/leaks.go b/leaks.go index b46fa2a3..961da2f9 100644 --- a/leaks.go +++ b/leaks.go @@ -87,7 +87,7 @@ func getLeaks(repoName string, concurrency int) []LeakElem { ) if concurrency == 0 { - concurrency = 100 + concurrency = 10 } semaphoreChan := make(chan struct{}, concurrency) @@ -112,6 +112,10 @@ func getLeaks(repoName string, concurrency int) []LeakElem { defer commitWG.Done() var leakPrs bool + if currCommit == "" { + return + } + if err := os.Chdir(fmt.Sprintf("%s/%s", appRoot, repoName)); err != nil { log.Fatal(err) } @@ -122,8 +126,11 @@ func getLeaks(repoName string, concurrency int) []LeakElem { <-semaphoreChan if err != nil { + fmt.Printf("error retrieving diff for commit %s try turning concurrency factor down %v\n", currCommit, err) + cleanup(repoName) return } + lines := checkRegex(string(out)) if len(lines) == 0 { return