From 54925012569a3c9bc1971f73927332c6187a4622 Mon Sep 17 00:00:00 2001 From: piercingl1ght Date: Thu, 26 Oct 2023 18:00:20 +0300 Subject: [PATCH] not using influxdb --- .../services/modules/influxdb/index.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/searching-front/services/modules/influxdb/index.ts b/searching-front/services/modules/influxdb/index.ts index 1f720d1..0ecc804 100644 --- a/searching-front/services/modules/influxdb/index.ts +++ b/searching-front/services/modules/influxdb/index.ts @@ -25,7 +25,8 @@ class InfluxDb { return writeApi } writeSitesCount({ all, available }: WriteSitesCounteParams) { - const writeApi = this.getWriteApi() + return + /*const writeApi = this.getWriteApi() const pointAll = new Point(influxPointName).intField(InfluxField.ALL_SITES, all) const pointAvailable = new Point(influxPointName).intField( InfluxField.AVAILABLE_SITES, @@ -33,18 +34,21 @@ class InfluxDb { ) writeApi.writePoint(pointAll) writeApi.writePoint(pointAvailable) - writeApi.close() + writeApi.close() */ } async query({ field, period }: QueryParams) { - const queryApi = this.client.getQueryApi(influxOrg) + return [] + /* const queryApi = this.client.getQueryApi(influxOrg) const query = influxQuery(field, period) const result = await queryApi.collectRows(query) - return processInfluxResult(result); + return processInfluxResult(result); */ } async getHistoryOfState(period: InfluxPeriod) { - const all = await this.query({ + return { all: [], available: [] } + + /* const all = await this.query({ field: InfluxField.ALL_SITES, period, }) @@ -57,7 +61,7 @@ class InfluxDb { return { all, available, - } + } */ } }