diff --git a/rill.go b/rill.go index ba29715..158842f 100644 --- a/rill.go +++ b/rill.go @@ -42,7 +42,7 @@ func (f *Forge) rillUpdate(pool1 int, pool2 int) (int, error) { func (f *Forge) updateRepo(repo *gitpb.Repo) error { if !repo.IsValidDir() { - log.Printf("%10s %-50s gopath=%s\n", "git dir is missing:", repo.FullPath, repo.GetGoPath()) + log.Printf("%10s %-50s gopath=%s\n", "git dir is missing\n", repo.FullPath, repo.GetGoPath()) f.Repos.DeleteByFullPath(repo.FullPath) f.configSave = true return nil @@ -79,7 +79,7 @@ func (f *Forge) RillReload() int { var all []*gitpb.Repo for repo := range f.Repos.IterAll() { if !repo.IsValidDir() { - log.Printf("%s %-50s", "got an invalid repo in forgepb.RillReload()", repo.GetGoPath()) + log.Printf("%s %-50s\n", "got an invalid repo in forgepb.RillReload()", repo.GetGoPath()) continue } all = append(all, repo) @@ -113,55 +113,6 @@ func (f *Forge) RillReload() int { // todo: store x,y in forge config ? (or compute them. notsure) func (f *Forge) RillFuncError(rillf func(*gitpb.Repo) error) map[string]*RillStats { return f.RillRepos(rillf) - /* - var all []*gitpb.Repo - - var stats map[string]*RillStats - stats = make(map[string]*RillStats) - - for repo := range f.Repos.IterAll() { - if !repo.IsValidDir() { - log.Printf("%s %-50s", "got an invalid repo in forgepb.RillFuncError()", repo.GetGoPath()) - continue - } - all = append(all, repo) - } - // Convert a slice of user IDs into a channel - ids := rill.FromSlice(all, nil) - - var counter int - var watch int = 10 - var meMu sync.Mutex - - // Read users from the API. - // Concurrency = 20 - dirs := rill.Map(ids, RillX, func(id *gitpb.Repo) (*gitpb.Repo, error) { - return id, nil - }) - - err := rill.ForEach(dirs, RillY, func(repo *gitpb.Repo) error { - meMu.Lock() - counter += 1 - if counter > watch { - // log.Info("Processed", watch, "repos") // this doesn't work - watch += 50 - } - meMu.Unlock() - rillSetStartTime(stats, repo.GetFullPath()) - err := rillf(repo) - if err != nil { - rillSetError(stats, repo.GetFullPath(), err) - } - rillSetEndTime(stats, repo.GetFullPath()) - return err - }) - - if err != nil { - log.Info("rill.ForEach() error:", err) - } - - return stats - */ } func (f *Forge) ConfigRill(rillX int, rillY int) {