From 277f6859b218597e5413ce762155b28dcde11df0 Mon Sep 17 00:00:00 2001 From: Martin Man Date: Thu, 31 Oct 2024 10:43:20 +0300 Subject: [PATCH] fix: Set retention properly --- src/server/influxdb.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/influxdb.ts b/src/server/influxdb.ts index e54fb11..fef73f4 100644 --- a/src/server/influxdb.ts +++ b/src/server/influxdb.ts @@ -114,7 +114,7 @@ export class InfluxDBBackend { } private async _connect() { - const { host, port, database, username, password } = this.server.config.influxdb + const { host, port, database, retention, username, password } = this.server.config.influxdb this.host = host this.port = port @@ -142,7 +142,7 @@ export class InfluxDBBackend { await this.influxClient.createDatabase(this.database) } this.isConnected = true - await this._setRetentionPolicy(this.retention) + await this._setRetentionPolicy(retention) } catch (error) { this.logger.error(`Unable to connect: ${error}`) throw error