hotfix on qrz inserts
This commit is contained in:
parent
bc6518b2a5
commit
b873d89eba
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user