Sfoglia il codice sorgente

in influxdb handler changed tags to tag_columns in the write method

tanja 3 anni fa
parent
commit
d95b71d2c8
1 ha cambiato i file con 2 aggiunte e 4 eliminazioni
  1. 2 4
      cdplib/db_handlers/InfluxdbHandler.py

+ 2 - 4
cdplib/db_handlers/InfluxdbHandler.py

@@ -146,8 +146,6 @@ class InfluxdbHandler:
         :type tiime_precision: str
         """
         
-        tags = {col: dataframe[col] for col in tag_columns}
-        
         measurement_columns = [c for c in dataframe.columns
                                if c not in tag_columns]
         
@@ -156,11 +154,11 @@ class InfluxdbHandler:
                 self.client.write_points(
                     dataframe=dataframe[column].to_frame(),
                     measurement=column,
-                    tags=tags,
+                    tag_columns=tag_columns,
                     protocol='line',
                     batch_size=batch_size,
                     time_precision=time_precision)
 
             except Exception as error:
-                self._logger.loger_and_raise_error(
+                self._logger.log_and_raise_error(
                     ('Could not insert data, Error: {}'.format(error)))