Count account test without fetching bodies
This commit is contained in:
parent
a17d2c8a2c
commit
03ce0ad8ea
2 changed files with 16 additions and 6 deletions
|
|
@ -210,12 +210,9 @@ func CheckAccount(name string) error {
|
|||
}
|
||||
total := 0
|
||||
for _, folder := range folders {
|
||||
folderTotal := 0
|
||||
if err := src.Fetch(folder.Name, func(m RawMessage) error {
|
||||
folderTotal++
|
||||
return nil
|
||||
}); err != nil {
|
||||
return fmt.Errorf("fetch source %s %s: %w", a.Name, folder.Name, err)
|
||||
folderTotal, err := src.Count(folder.Name)
|
||||
if err != nil {
|
||||
return fmt.Errorf("count source %s %s: %w", a.Name, folder.Name, err)
|
||||
}
|
||||
log.Printf("account %s source folder %s messages=%d", a.Name, folder.Name, folderTotal)
|
||||
total += folderTotal
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue