File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
server/src/services/infrastructure Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -142,10 +142,9 @@ class JobGenerator implements IJobGenerator {
142142 } ;
143143 } ;
144144
145- // Aggregates stats for the previous UTC hour and (at UTC midnight) the previous UTC day
146145 generateStatsAggregationJob = ( ) => {
147146 return async ( ) => {
148- // Compute previous hour window in UTC
147+ // Get previous hour window in UTC
149148 const now = new Date ( ) ;
150149 const utcNow = new Date (
151150 Date . UTC (
@@ -174,7 +173,7 @@ class JobGenerator implements IJobGenerator {
174173 // Upsert hourly stats for the last full hour
175174 await this . statsAggregationService . upsertHourly ( hourStart , hourEnd ) ;
176175
177- // Roll up the current day-so- far (not finalized) so charts have partial daily data
176+ // Roll up the current day so far so we have partial data for the current day
178177 const todayStart = new Date (
179178 Date . UTC (
180179 now . getUTCFullYear ( ) ,
@@ -188,7 +187,7 @@ class JobGenerator implements IJobGenerator {
188187 ) ;
189188 await this . statsAggregationService . rollupDaily ( todayStart , utcNow , false ) ;
190189
191- // If at UTC midnight hour (i.e., hour just rolled over), finalize the previous day
190+ // If at UTC midnight hour finalize the previous day
192191 const hour = utcNow . getUTCHours ( ) ;
193192 if ( hour === 0 ) {
194193 const dayEnd = todayStart ; // just reached 00:00, previous day ends now
You can’t perform that action at this time.
0 commit comments