summaryrefslogtreecommitdiff
path: root/rill.go
diff options
context:
space:
mode:
Diffstat (limited to 'rill.go')
-rw-r--r--rill.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/rill.go b/rill.go
index f72c06d..d0dde77 100644
--- a/rill.go
+++ b/rill.go
@@ -6,9 +6,9 @@ import (
"time"
"github.com/destel/rill"
- "go.wit.com/lib/ENV"
"go.wit.com/lib/cobol"
"go.wit.com/lib/config"
+ "go.wit.com/lib/env"
"go.wit.com/lib/protobuf/gitpb"
"go.wit.com/log"
)
@@ -36,11 +36,11 @@ func (f *Forge) RillReload() int {
var counter int
// Read users from the API.
// Concurrency = 20
- dirs := rill.Map(ids, cobol.Int(ENV.Get("RillX")), func(repo *gitpb.Repo) (*gitpb.Repo, error) {
+ dirs := rill.Map(ids, cobol.Int(env.Get("RillX")), func(repo *gitpb.Repo) (*gitpb.Repo, error) {
return repo, nil
})
- rill.ForEach(dirs, cobol.Int(ENV.Get("RillY")), func(repo *gitpb.Repo) error {
+ rill.ForEach(dirs, cobol.Int(env.Get("RillY")), func(repo *gitpb.Repo) error {
if err := repo.HasChanged(); err != nil {
counter += 1
return err
@@ -60,8 +60,8 @@ func (f *Forge) RillFuncError(rillf func(*gitpb.Repo) error) map[string]*RillSta
}
func (f *Forge) ConfigRill(rillX int, rillY int) {
- ENV.Set("RillX", fmt.Sprintf("%d", rillX))
- ENV.Set("RillY", fmt.Sprintf("%d", rillY))
+ env.Set("RillX", fmt.Sprintf("%d", rillX))
+ env.Set("RillY", fmt.Sprintf("%d", rillY))
// log.Infof("Setting rill values to %d,%d\n", f.Config.RillX, f.Config.RillY)
}
@@ -135,11 +135,11 @@ func (f *Forge) RillRepos(rillf func(*gitpb.Repo) error) map[string]*RillStats {
// Read users from the API.
// Concurrency = 20
- dirs := rill.Map(ids, cobol.Int(ENV.Get("RillX")), func(id *gitpb.Repo) (*gitpb.Repo, error) {
+ dirs := rill.Map(ids, cobol.Int(env.Get("RillX")), func(id *gitpb.Repo) (*gitpb.Repo, error) {
return id, nil
})
- rill.ForEach(dirs, cobol.Int(ENV.Get("RillY")), func(repo *gitpb.Repo) error {
+ rill.ForEach(dirs, cobol.Int(env.Get("RillY")), func(repo *gitpb.Repo) error {
// todo: make this a goroutine to show stats to the user
rillMu.Lock()
counter += 1
@@ -186,11 +186,11 @@ func (f *Forge) RunOnRepos(repos *gitpb.Repos, rillf func(*gitpb.Repo) error) ma
// Read users from the API.
// Concurrency = 20
- dirs := rill.Map(ids, cobol.Int(ENV.Get("RillX")), func(id *gitpb.Repo) (*gitpb.Repo, error) {
+ dirs := rill.Map(ids, cobol.Int(env.Get("RillX")), func(id *gitpb.Repo) (*gitpb.Repo, error) {
return id, nil
})
- rill.ForEach(dirs, cobol.Int(ENV.Get("RillY")), func(repo *gitpb.Repo) error {
+ rill.ForEach(dirs, cobol.Int(env.Get("RillY")), func(repo *gitpb.Repo) error {
// todo: make this a goroutine to show stats to the user
rillMu.Lock()
counter += 1