influxdb_v1: removes untested create_database function

This commit is contained in:
Mose Mueller 2024-12-17 07:29:53 +01:00
parent bdeb62e595
commit 71dedf3900
2 changed files with 0 additions and 22 deletions

View File

@ -88,11 +88,6 @@ Interact with an InfluxDBv1 server using the `InfluxDBv1Session` class. **Note t
from pydase_service_base.database import InfluxDBv1Session
with InfluxDBv1Session() as influx_client:
# Creating a database
influx_client.create_database(
dbname='my_new_database'
)
# Writing data to a database
data = [
{

View File

@ -155,20 +155,3 @@ class InfluxDBv1Session:
batch_size=batch_size,
consistency=consistency,
)
def create_database(
self,
dbname: str,
) -> None:
"""Create a new database in the InfluxDB instance. This function wraps the
create_database from `influxdb` in a try-catch block and logs potential errors.
Args:
dbname:
The name of the database to create.
"""
try:
self._client.create_database(dbname=dbname)
except Exception as e:
logger.error(e)