From fd9d6bcb2601aa28a7c39f083e1a01059e1b4715 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Sun, 26 Dec 2021 18:06:09 -0500 Subject: make used of DeviceNickname --- qolab/tsdb/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qolab/tsdb/__init__.py b/qolab/tsdb/__init__.py index 7f7ecc0..a985534 100644 --- a/qolab/tsdb/__init__.py +++ b/qolab/tsdb/__init__.py @@ -38,7 +38,10 @@ def tsdb_append_metric_for_class_setter_or_getter(tsdb_logger=None): action = f.__name__[0:3] var_name = f.__name__[3:] val = None - device_type=cls.config['Device type'] + if cls.config['DeviceNickname'] is not None: + device_type=cls.config['DeviceNickname'] + else: + device_type=cls.config['Device type'] if action == 'get': """ getter """ val = f(*args, **kwds) @@ -86,7 +89,7 @@ if __name__ == '__main__': """ get D variable """ return self.d - dev = InstWithLog(tsdb_ingester=tsdb_ingester) + dev = InstWithLog(tsdb_ingester=tsdb_ingester, device_nickname='tester') dev.getD() dev.setD(3) -- cgit v1.2.3