File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -117,9 +117,9 @@ func Start() {
117
117
118
118
scheduler .Every (60 ).Seconds ().Tag ("messaging" ).Do (messaging .ConnectionCheck )
119
119
120
- scheduler .Every (1 ).Day ().At ("01:32 " ).Tag ("timeslices" ).Do (gasstation .CalcCountyTimeSlots )
120
+ scheduler .Every (1 ).Day ().At ("00:02 " ).Tag ("timeslices" ).Do (gasstation .CalcCountyTimeSlots )
121
121
122
- scheduler .Every (1 ).Day ().At ("03 :05" ).Tag ("averages" ).Do (gasstation .ReCalcCountyStatePrices )
122
+ scheduler .Every (1 ).Day ().At ("02 :05" ).Tag ("averages" ).Do (gasstation .ReCalcCountyStatePrices )
123
123
124
124
msgFileStr := os .Getenv ("MSG_MESSAGES" )
125
125
if len (strings .TrimSpace (msgFileStr )) > 3 {
Original file line number Diff line number Diff line change @@ -233,12 +233,12 @@ func createCodeTimeSliceBuckets(postCodePostCodeLocationMap map[int]pcmodel.Post
233
233
for _ , myPostCodeLocation := range postCodePostCodeLocationMap {
234
234
myPostCode := postcode .FormatPostCode (myPostCodeLocation .PostCode )
235
235
for _ , myGasStation := range postCodeGasStationsMap [myPostCode ] {
236
- yesterday := time .Now ().AddDate (0 , 0 , - 1 )
237
- //10 min slices
236
+ yesterday := time .Now ().AddDate (0 , 0 , - 1 ). Round ( time . Hour )
237
+ //15 min slices
238
238
timeSlices := make ([]time.Time , 0 )
239
- //10 min buckets
239
+ //15 min buckets
240
240
timeSliceBuckets := make (map [time.Time ][]gsmodel.GasPrice )
241
- for myTimeSlice := yesterday ; myTimeSlice .Before (time .Now ()); myTimeSlice = myTimeSlice .Add (time .Minute * 10 ) {
241
+ for myTimeSlice := yesterday ; myTimeSlice .Before (time .Now ()); myTimeSlice = myTimeSlice .Add (time .Minute * 15 ) {
242
242
timeSlices = append (timeSlices , myTimeSlice )
243
243
timeSliceBuckets [myTimeSlice ] = make ([]gsmodel.GasPrice , 0 )
244
244
}
You can’t perform that action at this time.
0 commit comments