Exemple #1
0
 def __call__(self):
     if hasattr(self, '_todelete'):
         config = solr_config(self)
         for revision in self._todelete:
             unindex_doc(config, revision)
             del self.model[revision.__name__]
         del self._todelete
     self.model()
     self.metadata()
 def __call__(self):
     if not hasattr(self, '_todelete'):
         return
     config = solr_config(self)
     for repository in self._todelete:
         for media in repository.values():
             unindex_doc(config, media)
             for revision in media.values():
                 unindex_doc(config, revision)
         path = os.path.join(self.dbpath, repository.__name__)
         shutil.rmtree(path)
     del self._todelete
Exemple #3
0
 def __call__(self):
     if hasattr(self, '_todelete'):
         config = solr_config(self)
         for media in self._todelete:
             unindex_doc(config, media)
             for revision in media.values():
                 unindex_doc(config, revision)
             path = os.path.join(self.model.__name__,
                                 *media.model.mediapath + ['media.info'])
             os.remove(path)
             del self.model[media.__name__]
         del self._todelete
     self.model()
     self.metadata()