remove transaction from imdb import

Removing the transaction will allow other (async) operations to succeed
while the import is running, otherwise the database will be locked.
It also actually speeds up the import process, and there's no good
reason to roll back if the import aborts mid run.
This commit is contained in:
ducklet 2021-07-11 17:23:19 +02:00
parent 294e311aff
commit 88fa1355cd

View file

@ -189,8 +189,6 @@ async def import_from_file(*, basics_path: Path, ratings_path: Path):
perc = 0.0 perc = 0.0
perc_step = 0.001 perc_step = 0.001
async with db.shared_connection().transaction():
chunk = [] chunk = []
for i, m in enumerate(read_basics(basics_path)): for i, m in enumerate(read_basics(basics_path)):