Exemple #1
0
 def __init__(self, *va, **kw):
   '''Setup the application
   '''
   Application.__init__(self, *va, **kw)
   
   # Use a shared dict, mapped in shared memory and shared between processes
   self.entries = shared_dict(homedir=os.path.join(os.path.dirname(__file__), 'store'),
     persistent=True)
Exemple #2
0
 def __init__(self):
   self.entries = shared_dict(persistent=False)
Exemple #3
0
 def __init__(self):
   # If persistent evaluates to True, the contents of the shared 
   # dict will be flushed to disk on shutdown and read from disk 
   # on startup, thus providing a persistent set of data.
   self.entries = shared_dict(persistent=config.get('persistent'))