Skip to content

Commit

Permalink
try reduce connection pg
Browse files Browse the repository at this point in the history
  • Loading branch information
sdirollo committed Aug 29, 2023
1 parent d58f4f9 commit fa0db4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion importer/import.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def print_timer():
f"{timedelta(seconds=(time.time()-start))}"
)

nb_workers = 4
nb_workers = min(8, cpu_count())
with Pool(nb_workers, context=mp_context) as pool:
res = pool.imap_unordered(import_zone, zones_iterator, chunksize=10)
pool.close()
Expand Down

0 comments on commit fa0db4b

Please sign in to comment.