Пример #1
0
def batch(iterable):
    parallelize(process,
                iterable,
                prefix='Importing…',
                chunk_size=20000,
                throttle=500)
Пример #2
0
def create_edge_ngrams(*args):
    pattern = '{}*'.format(dbkeys.TOKEN_PREFIX)
    parallelize(index_ngram_keys,
                DB.scan_iter(match=pattern),
                chunk_size=10000,
                throttle=1000)
Пример #3
0
def batch(iterable):
    parallelize(process_documents,
                iterable,
                chunk_size=config.BATCH_CHUNK_SIZE,
                throttle=timedelta(seconds=1))
Пример #4
0
def create_edge_ngrams(*args):
    parallelize(index_ngram_key,
                DB.scan_iter(match='w|*'),
                prefix="Computing ngrams",
                throttle=1000)
Пример #5
0
def batch(iterable):
    parallelize(process, iterable, prefix='Importing…', chunk_size=20000,
                throttle=500)
Пример #6
0
def create_edge_ngrams(*args):
    parallelize(index_ngram_key, DB.scan_iter(match='w|*'),
                prefix="Computing ngrams", throttle=1000)
Пример #7
0
def create_edge_ngrams(*args):
    parallelize(index_ngram_keys,
                DB.scan_iter(match='w|*'),
                chunk_size=10000,
                throttle=1000)