diff --git a/metrics/timescaledb/writer.py b/metrics/timescaledb/writer.py index 0a1aec5c..2c0b670d 100644 --- a/metrics/timescaledb/writer.py +++ b/metrics/timescaledb/writer.py @@ -31,14 +31,13 @@ def ensure_table(engine, table): class TimescaleDBWriter: - values = [] - def __init__(self, table, engine=None): if engine is None: engine = create_engine(TIMESCALEDB_URL) self.engine = engine self.table = table + self.values = [] def __enter__(self): ensure_table(self.engine, self.table)