将终端台账拆分为pq&pms两类
This commit is contained in:
@@ -3,6 +3,7 @@ package com.njcn.influxdb.utils;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import okhttp3.OkHttpClient;
|
||||
import org.influxdb.InfluxDB;
|
||||
import org.influxdb.InfluxDB.ConsistencyLevel;
|
||||
import org.influxdb.InfluxDBFactory;
|
||||
@@ -31,6 +32,10 @@ import java.util.concurrent.TimeUnit;
|
||||
@Slf4j
|
||||
@Data
|
||||
public class InfluxDbUtils {
|
||||
static OkHttpClient.Builder client = new OkHttpClient.Builder()
|
||||
.connectTimeout(1000,TimeUnit.SECONDS)
|
||||
.readTimeout(1000, TimeUnit.SECONDS)
|
||||
.writeTimeout(1000, TimeUnit.SECONDS);
|
||||
private static final int FRACTION_MIN_WIDTH = 0;
|
||||
private static final int FRACTION_MAX_WIDTH = 9;
|
||||
private static final boolean ADD_DECIMAL_POINT = true;
|
||||
@@ -70,7 +75,7 @@ public class InfluxDbUtils {
|
||||
*/
|
||||
public InfluxDB influxDbBuild() {
|
||||
if (influxDB == null) {
|
||||
influxDB = InfluxDBFactory.connect(openurl, username, password);
|
||||
influxDB = InfluxDBFactory.connect(openurl, username, password,client);
|
||||
}
|
||||
try {
|
||||
// if (!influxDB.databaseExists(database)) {
|
||||
@@ -87,6 +92,8 @@ public class InfluxDbUtils {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 创建数据库
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user