Skip to content

Commit

Permalink
Don't block on insert_docs, closes #22
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Jun 9, 2022
1 parent 7f2bacb commit 8127afc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions datasette_upload_csvs/__init__.py
Expand Up @@ -87,7 +87,7 @@ def insert_initial_record(conn):
alter=True,
)

await db.execute_write_fn(insert_initial_record, block=True)
await db.execute_write_fn(insert_initial_record)

def insert_docs(conn):
database = sqlite_utils.Database(conn)
Expand Down Expand Up @@ -124,7 +124,7 @@ def docs_with_progress():
)
return database[filename].count

await db.execute_write_fn(insert_docs)
await db.execute_write_fn(insert_docs, block=False)

if formdata.get("xhr"):
return Response.json(
Expand Down

0 comments on commit 8127afc

Please sign in to comment.