|
@@ -114,7 +114,7 @@ export class StatsAggregationScheduler implements OnModuleInit {
|
|
|
|
|
|
|
|
if (this.lastHourlyWindowToSec === currentHourStartSec) {
|
|
if (this.lastHourlyWindowToSec === currentHourStartSec) {
|
|
|
this.logger.debug(
|
|
this.logger.debug(
|
|
|
- `⏰ Hourly aggregation already processed window [${currentHourStartSec - 3600},${currentHourStartSec}) this hour.`,
|
|
|
|
|
|
|
+ `⏰ Hourly aggregation already processed window [${currentHourStartSec - 3600},${currentHourStartSec}] this hour.`,
|
|
|
);
|
|
);
|
|
|
this.runningHourly = false;
|
|
this.runningHourly = false;
|
|
|
return;
|
|
return;
|
|
@@ -122,7 +122,7 @@ export class StatsAggregationScheduler implements OnModuleInit {
|
|
|
|
|
|
|
|
const toSec = currentHourStartSec;
|
|
const toSec = currentHourStartSec;
|
|
|
const fromSec = toSec - 3600;
|
|
const fromSec = toSec - 3600;
|
|
|
- const tag = `⏰ Hourly aggregation [${fromSec},${toSec})`;
|
|
|
|
|
|
|
+ const tag = `⏰ Hourly aggregation [${fromSec},${toSec}]`;
|
|
|
|
|
|
|
|
this.logger.log(`${tag} start`);
|
|
this.logger.log(`${tag} start`);
|
|
|
|
|
|
|
@@ -162,7 +162,7 @@ export class StatsAggregationScheduler implements OnModuleInit {
|
|
|
const nowSec = Math.floor(Date.now() / 1000);
|
|
const nowSec = Math.floor(Date.now() / 1000);
|
|
|
const yesterdayStartSec = this.floorToDayGmt8(nowSec) - 86400;
|
|
const yesterdayStartSec = this.floorToDayGmt8(nowSec) - 86400;
|
|
|
const yesterdayEndSec = yesterdayStartSec + 86400;
|
|
const yesterdayEndSec = yesterdayStartSec + 86400;
|
|
|
- const tag = `🗓️ Daily catch-all (GMT+8) [${yesterdayStartSec},${yesterdayEndSec})`;
|
|
|
|
|
|
|
+ const tag = `🗓️ Daily catch-all (GMT+8) [${yesterdayStartSec},${yesterdayEndSec}]`;
|
|
|
|
|
|
|
|
if (!this.hasDailyRefresh(this.statsAggregation)) {
|
|
if (!this.hasDailyRefresh(this.statsAggregation)) {
|
|
|
this.logger.warn(
|
|
this.logger.warn(
|