fix(core): Remove duplicated logs for insights (#16228)

This commit is contained in:
Guillaume Jacquart
2025-06-11 13:36:29 +02:00
committed by GitHub
parent f0cf6dcbcd
commit 56b16b8c0f
3 changed files with 3 additions and 7 deletions

View File

@@ -76,6 +76,7 @@ export class InsightsCollectionService {
startFlushingTimer() {
this.isAsynchronouslySavingInsights = true;
this.scheduleFlushing();
this.logger.debug('Started flushing timer');
}
scheduleFlushing() {

View File

@@ -42,7 +42,7 @@ export class InsightsPruningService {
this.clearPruningTimer();
this.isStopped = false;
this.scheduleNextPrune();
this.logger.debug(`Insights pruning every ${this.config.pruneCheckIntervalHours} hours`);
this.logger.debug('Started pruning timer');
}
private clearPruningTimer() {
@@ -55,7 +55,7 @@ export class InsightsPruningService {
stopPruningTimer() {
this.isStopped = true;
this.clearPruningTimer();
this.logger.debug('Stopped Insights pruning');
this.logger.debug('Stopped pruning timer');
}
private scheduleNextPrune(

View File

@@ -42,7 +42,6 @@ export class InsightsService {
startTimers() {
this.collectionService.startFlushingTimer();
this.logger.debug('Started flushing timer');
// Start compaction and pruning timers for main leader instance only
if (this.instanceSettings.isLeader) {
@@ -53,19 +52,15 @@ export class InsightsService {
@OnLeaderTakeover()
startCompactionAndPruningTimers() {
this.compactionService.startCompactionTimer();
this.logger.debug('Started compaction timer');
if (this.pruningService.isPruningEnabled) {
this.pruningService.startPruningTimer();
this.logger.debug('Started pruning timer');
}
}
@OnLeaderStepdown()
stopCompactionAndPruningTimers() {
this.compactionService.stopCompactionTimer();
this.logger.debug('Stopped compaction timer');
this.pruningService.stopPruningTimer();
this.logger.debug('Stopped pruning timer');
}
@OnShutdown()