summaryrefslogtreecommitdiff
path: root/scanRepoDir.go
diff options
context:
space:
mode:
Diffstat (limited to 'scanRepoDir.go')
-rw-r--r--scanRepoDir.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/scanRepoDir.go b/scanRepoDir.go
index 4d8cc2f..21e411d 100644
--- a/scanRepoDir.go
+++ b/scanRepoDir.go
@@ -7,6 +7,7 @@ import (
"path/filepath"
"github.com/destel/rill"
+ "go.wit.com/lib/ENV"
"go.wit.com/lib/cobol"
"go.wit.com/lib/config"
"go.wit.com/lib/protobuf/gitpb"
@@ -38,7 +39,7 @@ func (f *Forge) checkNamespace(fullpath string) (*gitpb.Repo, error) {
}
func (f *Forge) RescanRepos() error {
- gopath := config.Get("gopath")
+ gopath := ENV.Get("gopath")
log.Info("RescanRepos() running in", gopath)
f.ScanRepoDir(gopath)
// f.SaveRepos()
@@ -83,13 +84,13 @@ func (f *Forge) rillScanDirsNew(fullpaths []string) (int, error) {
ids := rill.FromSlice(fullpaths, nil)
// Read users from the API. // Concurrency = 20
- dirs := rill.Map(ids, cobol.Int(config.Get("RillX")), func(id string) (*gitpb.Repo, error) {
+ dirs := rill.Map(ids, cobol.Int(ENV.Get("RillX")), func(id string) (*gitpb.Repo, error) {
return f.checkNamespace(id)
})
var counter int
// Activate users. // Concurrency = 10
- err := rill.ForEach(dirs, cobol.Int(config.Get("RillY")), func(repo *gitpb.Repo) error {
+ err := rill.ForEach(dirs, cobol.Int(ENV.Get("RillY")), func(repo *gitpb.Repo) error {
if repo == nil {
return nil
}