From aa0382e44311f9f7e62a688c8fcaa9c69a512e0f Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期二, 24 十二月 2024 15:15:10 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/influxdb/common/config/InfluxDBInstance.java | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/influxdb/common/config/InfluxDBInstance.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/influxdb/common/config/InfluxDBInstance.java index fa23641..69ef90b 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/influxdb/common/config/InfluxDBInstance.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/influxdb/common/config/InfluxDBInstance.java @@ -1,5 +1,6 @@ package com.iailab.module.data.influxdb.common.config; +import com.iailab.framework.tenant.core.context.TenantContextHolder; import com.influxdb.client.InfluxDBClient; import com.influxdb.client.InfluxDBClientFactory; import org.slf4j.Logger; @@ -18,14 +19,16 @@ @Value("${influx-db.org}") public String org; - @Value("${influx-db.bucket}") - public String bucket; + /*@Value("${influx-db.bucket}") + public String bucket;*/ @Value("${influx-db.token}") public String token; @Value("${influx-db.url}") public String url; + + private final static String BUCKET_NAME = "bucket_"; private Logger logger = LoggerFactory.getLogger(getClass()); @@ -43,5 +46,8 @@ return client; } + public String getBucket() { + return BUCKET_NAME + TenantContextHolder.getRequiredTenantId(); + } } -- Gitblit v1.9.3