Exemple #1
0
 def keyfs(self):
     from devpi_server.keyfs import KeyFS
     from devpi_server.model import add_keys
     keyfs = KeyFS(self.config.serverdir,
                   self.config.storage,
                   readonly=self.is_replica(),
                   cache_size=self.config.args.keyfs_cache_size)
     add_keys(self, keyfs)
     keyfs.finalize_init()
     if not self.config.args.requests_only:
         self.thread_pool.register(keyfs.notifier)
     return keyfs
Exemple #2
0
 def keyfs(self):
     from devpi_server.keyfs import KeyFS
     from devpi_server.model import add_keys
     keyfs = KeyFS(self.config.serverdir,
                   self.config.storage,
                   readonly=self.is_replica(),
                   cache_size=self.config.args.keyfs_cache_size)
     add_keys(self, keyfs)
     try:
         keyfs.finalize_init()
     except Exception:
         threadlog.exception("Error while trying to initialize storage")
         fatal("Couldn't initialize storage")
     if not self.config.requests_only:
         self.thread_pool.register(keyfs.notifier)
     return keyfs