Beispiel #1
0
 def __init__(self, dbs_url, dburi, config=None):
     if not config:
         config = {}
     self.dburi = dburi
     self.dbcoll = get_dbs_instance(dbs_url)
     self.dbs_url = dbs_url
     self.dbname = config.get("dbname", "dbs")
     self.cache_size = config.get("cache_size", 1000)
     self.expire = config.get("expire", 3600)
     self.write_hash = config.get("write_hash", False)
     # Shall we keep existing Datasets on server restart
     self.preserve_on_restart = config.get("preserve_on_restart", False)
     self.init()
Beispiel #2
0
 def __init__(self, dbs_url, dburi, config=None):
     if  not config:
         config = {}
     self.dburi      = dburi
     self.dbcoll     = get_dbs_instance(dbs_url)
     self.dbs_url    = dbs_url
     self.dbname     = config.get('dbname', 'dbs')
     self.cache_size = config.get('cache_size', 1000)
     self.expire     = config.get('expire', 3600)
     self.write_hash = config.get('write_hash', False)
     # Shall we keep existing Datasets on server restart
     self.preserve_on_restart = config.get('preserve_on_restart', False)
     self.init()
Beispiel #3
0
 def dbs_global_instance(self, system=None):
     "Retrive from mapping DB DBS url and extract DBS instance"
     if not system:
         system = self.main_dbs
     url = self.dbs_url(system)
     return get_dbs_instance(url)