mirror of
https://github.com/tiqi-group/pydase_service_base.git
synced 2025-04-20 08:20:03 +02:00
influxdb_v1: removes untested create_database function
This commit is contained in:
parent
bdeb62e595
commit
71dedf3900
@ -88,11 +88,6 @@ Interact with an InfluxDBv1 server using the `InfluxDBv1Session` class. **Note t
|
|||||||
from pydase_service_base.database import InfluxDBv1Session
|
from pydase_service_base.database import InfluxDBv1Session
|
||||||
|
|
||||||
with InfluxDBv1Session() as influx_client:
|
with InfluxDBv1Session() as influx_client:
|
||||||
# Creating a database
|
|
||||||
influx_client.create_database(
|
|
||||||
dbname='my_new_database'
|
|
||||||
)
|
|
||||||
|
|
||||||
# Writing data to a database
|
# Writing data to a database
|
||||||
data = [
|
data = [
|
||||||
{
|
{
|
||||||
|
@ -155,20 +155,3 @@ class InfluxDBv1Session:
|
|||||||
batch_size=batch_size,
|
batch_size=batch_size,
|
||||||
consistency=consistency,
|
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)
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user