Skip to content

Commit 492aee9

Browse files
committed
fix: ensure async loader is properly closed in reset function across examples
1 parent cb78cec commit 492aee9

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

bindings/python/examples/07_stackoverflow_tables_oltp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,9 +655,9 @@ def configure_arcadedb_async_loader(db, batch_size: int, parallelism: int = 1):
655655

656656
def reset_arcadedb_async_loader(db, async_exec):
657657
async_exec.wait_completion()
658-
async_exec.close()
659658
db.set_read_your_writes(True)
660659
async_exec.set_transaction_use_wal(True)
660+
async_exec.close()
661661

662662

663663
def insert_batch_sqlite(conn, table: Dict[str, Any], rows: List[Dict[str, Any]]):

bindings/python/examples/08_stackoverflow_tables_olap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,9 +629,9 @@ def configure_arcadedb_async_loader(db, batch_size: int, parallelism: int = 1):
629629

630630
def reset_arcadedb_async_loader(db, async_exec):
631631
async_exec.wait_completion()
632-
async_exec.close()
633632
db.set_read_your_writes(True)
634633
async_exec.set_transaction_use_wal(True)
634+
async_exec.close()
635635

636636

637637
def sqlite_type(field_type: str) -> str:

bindings/python/examples/13_stackoverflow_hybrid_queries.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,9 +497,9 @@ def configure_arcadedb_async_loader(db, batch_size: int, parallelism: int = 1):
497497

498498
def reset_arcadedb_async_loader(db, async_exec):
499499
async_exec.wait_completion()
500-
async_exec.close()
501500
db.set_read_your_writes(True)
502501
async_exec.set_transaction_use_wal(True)
502+
async_exec.close()
503503

504504

505505
def load_table_arcadedb_async(

0 commit comments

Comments
 (0)