コード例 #1
0
ファイル: esreindex.py プロジェクト: adityaputra/fjord
 def handle(self, *args, **options):
     logging.basicConfig(level=logging.INFO)
     percent = options['percent']
     mappingtypes = options['mappingtypes']
     if not 1 <= percent <= 100:
         raise CommandError('percent should be between 1 and 100')
     es_reindex_cmd(percent, mappingtypes)
コード例 #2
0
ファイル: esreindex.py プロジェクト: milossh/fjord
 def handle(self, *args, **options):
     logging.basicConfig(level=logging.INFO)
     percent = options['percent']
     mappingtypes = options['mappingtypes']
     if not 1 <= percent <= 100:
         raise CommandError('percent should be between 1 and 100')
     es_reindex_cmd(percent, mappingtypes)
コード例 #3
0
ファイル: esreindex.py プロジェクト: Givemore/fjord
    def handle(self, *args, **options):
        logging.basicConfig(level=logging.INFO)
        es_logger = logging.getLogger('elasticsearch')
        es_logger.setLevel(logging.ERROR)

        percent = options['percent']
        doctypes = options['doctypes']

        es_reindex_cmd(percent, doctypes)
コード例 #4
0
ファイル: esreindex.py プロジェクト: xrile/fjord
    def handle(self, *args, **options):
        logging.basicConfig(level=logging.INFO)
        es_logger = logging.getLogger('elasticsearch')
        es_logger.setLevel(logging.ERROR)

        percent = options['percent']
        doctypes = options['doctypes']

        es_reindex_cmd(percent, doctypes)
コード例 #5
0
    def handle(self, *args, **options):
        logging.basicConfig(level=logging.INFO)
        es_logger = logging.getLogger('elasticsearch')
        es_logger.setLevel(logging.ERROR)

        percent = options['percent']
        mappingtypes = options['mappingtypes']
        if not 1 <= percent <= 100:
            raise CommandError('percent should be between 1 and 100')
        es_reindex_cmd(percent, mappingtypes)
コード例 #6
0
ファイル: esreindex.py プロジェクト: Ritsyy/fjord
    def handle(self, *args, **options):
        logging.basicConfig(level=logging.INFO)
        es_logger = logging.getLogger('elasticsearch')
        es_logger.setLevel(logging.ERROR)

        percent = options['percent']
        doctypes = options['doctypes']
        if not 1 <= percent <= 100:
            raise CommandError('percent should be between 1 and 100')
        es_reindex_cmd(percent, doctypes)
コード例 #7
0
ファイル: __init__.py プロジェクト: Givemore/fjord
    def setup_indexes(self, empty=False, wait=True):
        """(Re-)create ES indexes."""
        if empty:
            recreate_index()
        else:
            # Removes the index, creates a new one, and indexes
            # existing data into it.
            es_reindex_cmd()

        self.refresh()
        if wait:
            get_es().cluster.health(wait_for_status='yellow')
コード例 #8
0
ファイル: __init__.py プロジェクト: xrile/fjord
    def setup_indexes(self, empty=False, wait=True):
        """(Re-)create ES indexes."""
        if empty:
            recreate_index()
        else:
            # Removes the index, creates a new one, and indexes
            # existing data into it.
            es_reindex_cmd()

        self.refresh()
        if wait:
            get_es().cluster.health(wait_for_status='yellow')
コード例 #9
0
    def setup_indexes(self, empty=False):
        """(Re-)create ES indexes."""
        from fjord.search.index import es_reindex_cmd

        if empty:
            # Removes the index and creates a new one with nothing in
            # it (by abusing the percent argument).
            es_reindex_cmd(percent=0)
        else:
            # Removes the index, creates a new one, and indexes
            # existing data into it.
            es_reindex_cmd()

        self.refresh(settings.ES_TEST_SLEEP_DURATION)
コード例 #10
0
ファイル: __init__.py プロジェクト: joshua-s/fjord
    def setup_indexes(self, empty=False, wait=True):
        """(Re-)create ES indexes."""
        from fjord.search.index import es_reindex_cmd

        if empty:
            # Removes the index and creates a new one with nothing in
            # it (by abusing the percent argument).
            es_reindex_cmd(percent=0)
        else:
            # Removes the index, creates a new one, and indexes
            # existing data into it.
            es_reindex_cmd()

        self.refresh()
        if wait:
            get_es().health(wait_for_status='yellow')
コード例 #11
0
    def setup_indexes(self, empty=False, wait=True):
        """(Re-)create ES indexes."""
        from fjord.search.index import es_reindex_cmd

        if empty:
            # Removes the index and creates a new one with nothing in
            # it (by abusing the percent argument).
            es_reindex_cmd(percent=0)
        else:
            # Removes the index, creates a new one, and indexes
            # existing data into it.
            es_reindex_cmd()

        self.refresh()
        if wait:
            get_es().cluster.health(wait_for_status='yellow')