Beispiel #1
0
def batch(iterable):
    parallelize(process,
                iterable,
                prefix='Importing…',
                chunk_size=20000,
                throttle=500)
Beispiel #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)
Beispiel #3
0
def batch(iterable):
    parallelize(process_documents,
                iterable,
                chunk_size=config.BATCH_CHUNK_SIZE,
                throttle=timedelta(seconds=1))
Beispiel #4
0
def create_edge_ngrams(*args):
    parallelize(index_ngram_key,
                DB.scan_iter(match='w|*'),
                prefix="Computing ngrams",
                throttle=1000)
Beispiel #5
0
def batch(iterable):
    parallelize(process, iterable, prefix='Importing…', chunk_size=20000,
                throttle=500)
Beispiel #6
0
def create_edge_ngrams(*args):
    parallelize(index_ngram_key, DB.scan_iter(match='w|*'),
                prefix="Computing ngrams", throttle=1000)
Beispiel #7
0
def create_edge_ngrams(*args):
    parallelize(index_ngram_keys,
                DB.scan_iter(match='w|*'),
                chunk_size=10000,
                throttle=1000)