From 1bda4d068b2ea00cd1af0c4cacab99cd8d5a446c Mon Sep 17 00:00:00 2001 From: Angular2guy Date: Wed, 27 Mar 2024 19:54:13 +0100 Subject: [PATCH] feat: enable code timeslices --- backend/pkd/gasstation/gsrepo.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/pkd/gasstation/gsrepo.go b/backend/pkd/gasstation/gsrepo.go index 4ba75fa..819a8ff 100644 --- a/backend/pkd/gasstation/gsrepo.go +++ b/backend/pkd/gasstation/gsrepo.go @@ -225,7 +225,7 @@ func ReCalcCountyStatePrices() { }) myDuration := time.Now().Sub(myStart) log.Printf("recalcCountyStatePrices finished for %v states and %v counties in %v.", len(idStateDataMap), len(idCountyDataMap), myDuration) - //go calcCountyTimeSlots() + go calcCountyTimeSlots() } func createCodeTimeSliceBuckets(postCodePostCodeLocationMap map[int]pcmodel.PostCodeLocation, postCodeGasStationsMap map[string][]gsmodel.GasStation) map[string]map[time.Time][]gsmodel.GasPrice { @@ -332,7 +332,7 @@ func calcCountyTimeSlots() { tx.Delete(&pcmodel.CountyTimeSlot{}) return nil }) - //TODO calc average changes in 10 min slots + //calc average changes in 10 min slots for _, myCountyData := range idCountyDataMap { //10 min buckets timeSliceBuckets := createTimeSliceBuckets(myCountyData, postCodeTimeSliceBuckets) @@ -344,7 +344,7 @@ func calcCountyTimeSlots() { return nil }) } - //TODO store changes in countytimeslots + //store changes in countytimeslots myDuration := time.Now().Sub(myStart) log.Printf("calcCountyTimeSlots finished for %v counties in %v.", len(idCountyDataMap), myDuration) }