cleanup
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 1m19s
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 1m19s
This commit is contained in:
parent
6cea5a1f29
commit
13964e0f65
@ -1,5 +1,6 @@
|
||||
package xyz.mcutils.backend.service;
|
||||
|
||||
import com.influxdb.client.InfluxDBClient;
|
||||
import com.influxdb.client.WriteApiBlocking;
|
||||
import com.influxdb.spring.influx.InfluxDB2AutoConfiguration;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
@ -32,7 +33,9 @@ public class MetricService {
|
||||
|
||||
@Autowired
|
||||
public MetricService(InfluxDB2AutoConfiguration influxAutoConfiguration, MetricsRepository metricsRepository) {
|
||||
this.influxWriteApi = influxAutoConfiguration.influxDBClient().getWriteApiBlocking();
|
||||
try (InfluxDBClient client = influxAutoConfiguration.influxDBClient()) {
|
||||
this.influxWriteApi = client.getWriteApiBlocking();
|
||||
}
|
||||
this.metricsRepository = metricsRepository;
|
||||
|
||||
// Register the metrics
|
||||
|
Loading…
x
Reference in New Issue
Block a user