From 2fe447f56ba327d0e36adb3b07a485421a9894e0 Mon Sep 17 00:00:00 2001 From: Max Magorsch Date: Wed, 24 Jun 2020 22:22:04 +0000 Subject: Make --compute-threads more verbose Signed-off-by: Max Magorsch --- pkg/importer/importer.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'pkg/importer') diff --git a/pkg/importer/importer.go b/pkg/importer/importer.go index e83bd9f..8e4f10c 100644 --- a/pkg/importer/importer.go +++ b/pkg/importer/importer.go @@ -84,7 +84,14 @@ func RecomputeThreads() { fmt.Println("Init thread computation...") filepath.Walk(config.MailDirPath(), initImport) + fmt.Println("Import thread references into database...") + overallLength := len(mails) + counter := 0 for _, mail := range mails { + if counter % 1000 == 0 { + fmt.Println("Imported thread references for " + strconv.Itoa(counter) + " of " + strconv.Itoa(overallLength) + " mails.") + } + counter++ insertReferencesToMail(mail.RawReferences, mail.Id, mail.From) } -- cgit v1.2.3-65-gdbad