log asses.Main new dir processing
parent
9c0129f968
commit
6626077201
|
|
@ -50,7 +50,7 @@ func One(ctx context.Context, p string) error {
|
|||
} else if stat, err := os.Stat(p); err != nil {
|
||||
return fmt.Errorf("cannot stat %s: %w", p, err)
|
||||
} else if stat.ModTime() == last.Modified {
|
||||
log.Printf("asses.One(%s) // unmodified since %v", shortp, last.T)
|
||||
//log.Printf("asses.One(%s) // unmodified since %v", shortp, last.T)
|
||||
return nil
|
||||
} else {
|
||||
log.Printf("asses.One(%s) // modified (%v) is now %v", shortp, last.Modified, stat.ModTime())
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package asses
|
|||
import (
|
||||
"context"
|
||||
"io/fs"
|
||||
"log"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"show-rss/src/asses"
|
||||
|
|
@ -24,7 +25,14 @@ func One(ctx context.Context) error {
|
|||
ctx, can := context.WithDeadline(ctx, asses.Deadline())
|
||||
defer can()
|
||||
|
||||
return OneWith(ctx, rootDs, asses.One)
|
||||
lastD := ""
|
||||
return OneWith(ctx, rootDs, func(ctx context.Context, p string) error {
|
||||
if d := path.Dir(p); d != lastD {
|
||||
log.Printf("asses.One(%s/...)...", d)
|
||||
lastD = d
|
||||
}
|
||||
return asses.One(ctx, p)
|
||||
})
|
||||
}
|
||||
|
||||
func OneWith(ctx context.Context, rootds []string, cb CB) error {
|
||||
|
|
|
|||
Loading…
Reference in New Issue