aboutsummaryrefslogtreecommitdiff
path: root/qolab/tsdb/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'qolab/tsdb/__init__.py')
-rw-r--r--qolab/tsdb/__init__.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/qolab/tsdb/__init__.py b/qolab/tsdb/__init__.py
index a985534..ff73832 100644
--- a/qolab/tsdb/__init__.py
+++ b/qolab/tsdb/__init__.py
@@ -1,14 +1,19 @@
import logging
import universal_tsdb as utsdb
+from universal_tsdb import Client, MaxErrorsException
import functools
import time
+__all__ = [
+ 'Client', 'Ingester', 'MaxErrorsException'
+]
+
logging.basicConfig(format='%(asctime)s %(levelname)8s %(name)s: %(message)s', datefmt='%m/%d/%Y %H:%M:%S')
logger = logging.getLogger('qolab.tsdb')
logger.setLevel(logging.INFO)
class Ingester(utsdb.Ingester):
- """ Same as universal_tsdb.Ingester byt set measurement_prefix.
+ """ Same as universal_tsdb.Ingester but sets measurement_prefix.
so measurement becomes measurement_prefix.measurement """
def __init__(self, client, batch=0, measurement_prefix=''):
super().__init__(client, batch=batch)
@@ -67,7 +72,7 @@ def tsdb_append_metric_for_class_setter_or_getter(tsdb_logger=None):
if __name__ == '__main__':
from qolab.hardware.basic import BasicInstrument
- tsdb_client = utsdb.Client('influx', 'http://localhost:8428', database='qolab')
+ tsdb_client = Client('influx', 'http://localhost:8428', database='qolab')
tsdb_ingester = Ingester(tsdb_client, batch=10, measurement_prefix='experiment.title')
class InstWithLog(BasicInstrument):
def __init__(self, *args, **kwds):