1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

fix: metrics v2 should await for the clearer (#1114)

This commit is contained in:
Ivar Conradi Østhus 2021-11-25 14:18:35 +01:00 committed by GitHub
parent 3dfc037df7
commit b47b507e18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();
}