示例#1
0
    def __init__(self,dbconn=None,pidfile='/tmp/cache.pid', **kw):
        # use of Master assumes that there are not a lot of new PVs being
        # added to the cache so that this lookup of PVs can be done once.
        MasterDB.__init__(self,dbconn=dbconn,**kw)

        self.db.set_autocommit(1)
        self.pid   = self.get_cache_pid()
        self.pidfile = pidfile
        self._table_alerts = self.db.tables['alerts']
        self.pvs   = {}
        self.data  = {}
        self.alert_data = {}
        self.db.set_autocommit(0)
        self.last_update = 0
示例#2
0
 def __init__(self,dbconn=None,**kw):
     MasterDB.__init__(self,dbconn=dbconn,**kw)
     self.inst_pos  = self.db.tables['instrument_positions']
示例#3
0
 def __init__(self,dbconn=None,**kw):
     # use of MasterDB assumes that there are not a lot of new PVs being
     # added to the cache so that this lookup of PVs can be done once.
     MasterDB.__init__(self,dbconn=dbconn,**kw)
示例#4
0
 def __init__(self,dbconn=None,**kw):
     MasterDB.__init__(self,dbconn=dbconn,**kw)
     self.alerts = self.db.tables['alerts']