Skip to content

Commit

Permalink
feat: enable code timeslices
Browse files Browse the repository at this point in the history
  • Loading branch information
Angular2Guy committed Mar 27, 2024
1 parent 7880c4c commit 1bda4d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/pkd/gasstation/gsrepo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
Expand All @@ -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)
}
Expand Down

0 comments on commit 1bda4d0

Please sign in to comment.