diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-26 18:06:09 -0500 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-26 18:06:09 -0500 |
commit | fd9d6bcb2601aa28a7c39f083e1a01059e1b4715 (patch) | |
tree | 20f3b81d9b66b10b1e7f4e8c8f12d7d12716ca5a /qolab/tsdb/__init__.py | |
parent | 4a65a486260bff420108e4c1200b2ad71560e4d1 (diff) | |
download | qolab-fd9d6bcb2601aa28a7c39f083e1a01059e1b4715.tar.gz qolab-fd9d6bcb2601aa28a7c39f083e1a01059e1b4715.zip |
make used of DeviceNickname
Diffstat (limited to 'qolab/tsdb/__init__.py')
-rw-r--r-- | qolab/tsdb/__init__.py | 7 |
1 files 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) |