rill dirty check
This commit is contained in:
parent
335531e0fb
commit
4444e942ea
22
doDirty.go
22
doDirty.go
|
@ -32,17 +32,27 @@ func straightCheckDirty() int {
|
||||||
return count
|
return count
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func doCheckDirty(repo *gitpb.Repo) error {
|
||||||
|
repo.CheckDirty()
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func doCheckDirtyAndConfigSave() {
|
func doCheckDirtyAndConfigSave() {
|
||||||
start := straightCheckDirty()
|
start := straightCheckDirty()
|
||||||
now := time.Now()
|
|
||||||
// log.Info("before findAll()")
|
// log.Info("before findAll()")
|
||||||
all := me.found.All()
|
/*
|
||||||
for all.Scan() {
|
all := me.found.All()
|
||||||
repo := all.Next()
|
for all.Scan() {
|
||||||
repo.CheckDirty()
|
repo := all.Next()
|
||||||
}
|
repo.CheckDirty()
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
// this might work?
|
||||||
|
now := time.Now()
|
||||||
|
me.forge.RillFuncError(20, 10, doCheckDirty)
|
||||||
end := straightCheckDirty()
|
end := straightCheckDirty()
|
||||||
log.Printf("dirty check (%d dirty repos) (%d total repos) took:%s\n", end, me.found.Len(), shell.FormatDuration(time.Since(now)))
|
log.Printf("dirty check (%d dirty repos) (%d total repos) took:%s\n", end, me.found.Len(), shell.FormatDuration(time.Since(now)))
|
||||||
|
|
||||||
if start != end {
|
if start != end {
|
||||||
// todo: use internal forgepb configsave flag. should work?
|
// todo: use internal forgepb configsave flag. should work?
|
||||||
me.forge.ConfigSave()
|
me.forge.ConfigSave()
|
||||||
|
|
Loading…
Reference in New Issue