Removed lab4.json (now constants in influxdb.py), config.ini to influx.ini

This commit is contained in:
l_samenv
2024-09-09 10:51:18 +02:00
parent 400899643b
commit 2a4efff511
4 changed files with 9 additions and 25 deletions

View File

@@ -533,7 +533,7 @@ class SeaInfluxInstrument(SeaInstrument):
def __init__(self, inst_name, instrument_config):
super().__init__(inst_name, instrument_config)
self.db = InfluxDB()
self.influx_data_getter = InfluxDataGetter(self.db, json.load(open("./graphs/lab4.json", "r"))["influx"])
self.influx_data_getter = InfluxDataGetter(self.db, inst_name)
self.device = self.influx_data_getter.get_device_name(int(datetime.now().timestamp()))
def newClient(self):
@@ -545,7 +545,7 @@ class InfluxInstrument(Instrument):
def __init__(self, instr_name):
self.db = InfluxDB()
self.influx_data_getter = InfluxDataGetter(self.db, json.load(open("./graphs/lab4.json", "r"))["influx"])
self.influx_data_getter = InfluxDataGetter(self.db, inst_name)
self.clients = {}
self.title = instr_name
self.device = self.influx_data_getter.get_device_name(int(datetime.now().timestamp()))