diff options
author | Max Magorsch <arzano@gentoo.org> | 2020-06-24 22:22:04 +0000 |
---|---|---|
committer | Max Magorsch <arzano@gentoo.org> | 2020-06-24 22:22:04 +0000 |
commit | 2fe447f56ba327d0e36adb3b07a485421a9894e0 (patch) | |
tree | ee56c24f9488c48efdda6cec3fee4d6564fa501d | |
parent | Create message_to_reference table if not present (diff) | |
download | archives-2fe447f56ba327d0e36adb3b07a485421a9894e0.tar.gz archives-2fe447f56ba327d0e36adb3b07a485421a9894e0.tar.bz2 archives-2fe447f56ba327d0e36adb3b07a485421a9894e0.zip |
Make --compute-threads more verbose
Signed-off-by: Max Magorsch <arzano@gentoo.org>
-rw-r--r-- | pkg/importer/importer.go | 7 |
1 files changed, 7 insertions, 0 deletions
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) } |