Paralelizados los mapeos

Esto es para mucha mas rapida ejecucion <3
This commit is contained in:
Daniel Cortes
2020-06-04 07:06:29 -04:00
parent 8b90a876dc
commit 5f5abd178d
2 changed files with 19 additions and 12 deletions

View File

@@ -69,3 +69,8 @@ def sanitize_keys(json):
return json
def parallel_map(items, function):
from multiprocessing import Pool
with Pool() as pool:
return pool.map(function, items)