From b47b507e187b9421fd677c23c98839a02afa51f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivar=20Conradi=20=C3=98sthus?= Date: Thu, 25 Nov 2021 14:18:35 +0100 Subject: [PATCH] fix: metrics v2 should await for the clearer (#1114) --- .../services/client-metrics/client-metrics-service-v2.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/services/client-metrics/client-metrics-service-v2.ts b/src/lib/services/client-metrics/client-metrics-service-v2.ts index 18120f3143..6f49011b99 100644 --- a/src/lib/services/client-metrics/client-metrics-service-v2.ts +++ b/src/lib/services/client-metrics/client-metrics-service-v2.ts @@ -29,9 +29,9 @@ export default class ClientMetricsServiceV2 { this.logger = getLogger('/services/client-metrics/index.ts'); this.bulkInterval = bulkInterval; - this.timer = setInterval(() => { - this.clientMetricsStoreV2.clearMetrics(48); - }, hoursToMilliseconds(24)); + this.timer = setInterval(async () => { + await this.clientMetricsStoreV2.clearMetrics(48); + }, hoursToMilliseconds(12)); this.timer.unref(); }