This commit is contained in:
2024-10-24 22:06:07 +07:00
parent 09e9c9ef80
commit ab7a2e487f
2 changed files with 9 additions and 4 deletions

View File

@ -5,6 +5,7 @@ import (
"strconv"
"strings"
"sync"
"time"
_ "github.com/mattn/go-sqlite3"
)
@ -58,6 +59,8 @@ func ProcessTelnetSpot(re *regexp.Regexp, spotRaw string, SpotChanToFlex chan Te
wg := new(sync.WaitGroup)
wg.Add(4)
start := time.Now()
go contactRepo.ListByCountry(spot.DXCC, contactsChan, wg)
contacts := <-contactsChan
@ -71,6 +74,8 @@ func ProcessTelnetSpot(re *regexp.Regexp, spotRaw string, SpotChanToFlex chan Te
contactsCall := <-contactsCallChan
wg.Wait()
elapsed := time.Since(start)
Log.Infof("Checking Db took: %s", elapsed)
if len(contacts) == 0 {
spot.NewDXCC = true