示例#1
0
 def reindex(self):
     processor = DocumentProcessorController(
         self.doc_provider,
         self.doc_processor,
         reset=self.reset,
         chunk_size=self.chunk_size,
     )
     processor.run()
示例#2
0
 def reindex(self):
     processor = DocumentProcessorController(
         self.doc_provider,
         self.doc_processor,
         reset=self.reset,
         chunk_size=self.chunk_size,
     )
     processor.run()
示例#3
0
 def migrate(self, filename=None, reset=False, max_retry=2, chunk_size=100):
     processor = DocumentProcessorController(
         self._get_document_provider(),
         self._get_doc_migrator(filename),
         reset,
         max_retry,
         chunk_size,
         progress_logger=self._get_progress_logger())
     return processor.run()
示例#4
0
 def migrate(self, filename=None, reset=False, max_retry=2, chunk_size=100):
     processor = DocumentProcessorController(
         self._get_document_provider(),
         self._get_doc_migrator(filename),
         reset,
         max_retry,
         chunk_size,
         progress_logger=self._get_progress_logger()
     )
     return processor.run()
示例#5
0
    def migrate(self, filename=None, reset=False, max_retry=2, chunk_size=100):
        if not self.domain:
            raise MigrationError("Must specify domain")

        doc_migrator = self.doc_migrator_class(self.slug, self.domain)

        document_provider = SqlDocumentProvider(self.iteration_key,
                                                FormReindexAccessor())

        processor = DocumentProcessorController(
            document_provider,
            doc_migrator,
            reset,
            max_retry,
            chunk_size,
        )
        return processor.run()
示例#6
0
    def migrate(self, filename=None, reset=False, max_retry=2, chunk_size=100):
        doc_migrator = self.doc_migrator_class(self.slug, self.couchdb,
                                               filename)

        progress_logger = CouchProcessorProgressLogger(self.doc_types)

        document_provider = CouchDocumentProvider(self.iteration_key,
                                                  self.doc_types)

        processor = DocumentProcessorController(
            document_provider,
            doc_migrator,
            reset,
            max_retry,
            chunk_size,
            progress_logger=progress_logger)
        return processor.run()