From b873d89eba724d729fa905c7c0ad91b177626f2a Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Sun, 13 Sep 2020 14:52:46 +0200 Subject: [PATCH] hotfix on qrz inserts --- src/qrz/main.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qrz/main.go b/src/qrz/main.go index e1e852f..ddc985c 100644 --- a/src/qrz/main.go +++ b/src/qrz/main.go @@ -50,7 +50,7 @@ func Run(config config.Config) (err error) { if len(frsPeople) > 0 { err = insertFrsEntryToDB(config, frsPeople) if err != nil { - log.Fatalln(err) + log.Println(err) } } else { fmt.Println(fmt.Sprintf("No entry to insert in database for group %s", group)) @@ -147,8 +147,7 @@ func insertFrsEntryToDB(config config.Config, frsPeople map[string]Qrz) (err err fmt.Println(fmt.Sprintf("Starting insert of %d entries", len(frsPeople))) for _, frs := range frsPeople { - fmt.Println(frs) - session.Insert(&frs) + _, err = session.Insert(&frs) qrzNum++ if (qrzNum % 5) == 0 { err = session.Commit()