From 9d4073ef3689d625d9b34957d6b229a773ce5714 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 9 Jul 2015 13:54:38 +0200 Subject: [PATCH] master: remove simple parameter history --- artiq/frontend/artiq_master.py | 5 +---- artiq/protocols/file_db.py | 16 ---------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/artiq/frontend/artiq_master.py b/artiq/frontend/artiq_master.py index 1c9b19e6a..1f95d26cc 100755 --- a/artiq/frontend/artiq_master.py +++ b/artiq/frontend/artiq_master.py @@ -7,7 +7,7 @@ import os from artiq.protocols.pc_rpc import Server from artiq.protocols.sync_struct import Publisher -from artiq.protocols.file_db import FlatFileDB, SimpleHistory +from artiq.protocols.file_db import FlatFileDB from artiq.master.scheduler import Scheduler from artiq.master.results import RTResults, get_last_rid from artiq.master.repository import Repository @@ -36,8 +36,6 @@ def main(): init_logger(args) ddb = FlatFileDB("ddb.pyon") pdb = FlatFileDB("pdb.pyon") - simplephist = SimpleHistory(30) - pdb.hooks.append(simplephist) rtr = RTResults() repository = Repository() @@ -74,7 +72,6 @@ def main(): "schedule": scheduler.notifier, "devices": ddb.data, "parameters": pdb.data, - "parameters_simplehist": simplephist.history, "rt_results": rtr.groups, "explist": repository.explist }) diff --git a/artiq/protocols/file_db.py b/artiq/protocols/file_db.py index 71228985c..6675dfcff 100644 --- a/artiq/protocols/file_db.py +++ b/artiq/protocols/file_db.py @@ -36,19 +36,3 @@ class FlatFileDB: timestamp = time() for hook in self.hooks: hook.delete(timestamp, name) - - -class SimpleHistory: - def __init__(self, depth): - self.depth = depth - self.history = Notifier([]) - - def set(self, timestamp, name, value): - if len(self.history.read) >= self.depth: - del self.history[0] - self.history.append((timestamp, name, value)) - - def delete(self, timestamp, name): - if len(self.history.read) >= self.depth: - del self.history[0] - self.history.append((timestamp, name))