Skip to content

Commit

Permalink
Removendo multiprocessamento para diminuir o consumo de memória.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro committed May 18, 2015
1 parent 5c15ccd commit bf74bd4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions py/parse_turmas_usp.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import json
import codecs
import locale
import multiprocessing
import dateutil.parser
import get_turmas_cepe
from datetime import datetime, timedelta
Expand Down Expand Up @@ -37,8 +36,7 @@ def main(db_dir, arq_saida, arq_antigo=None, obter_cepe=True):

arqs = map(lambda arq: os.path.join(db_dir, arq), os.listdir(db_dir))

pool = multiprocessing.Pool()
db_novo = dict(pool.map(processar_arquivo, arqs))
db_novo = dict(map(processar_arquivo, arqs))

if arq_antigo != None:
db_novo = fundir_dbs(db_novo, db_antigo)
Expand Down

0 comments on commit bf74bd4

Please sign in to comment.