Skip to content

Commit 8e9a247

Browse files
committed
NS feedback
1 parent b70d413 commit 8e9a247

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

source/includes/gridfs/gridfs-async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# end create custom bucket
1010

1111
# start upload files
12-
with bucket.open_upload_stream(
12+
async with bucket.open_upload_stream(
1313
"my_file", chunk_size_bytes=1048576, metadata={"contentType": "text/plain"}
1414
) as grid_in:
1515
await grid_in.write("data to store")

source/includes/write/transaction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def insert_documents(session):
2222
)
2323

2424
# Starts a client session
25-
with client.start_session() as session:
25+
async with client.start_session() as session:
2626
try:
2727
# Uses the with_transaction method to start a transaction, execute the callback, and commit (or abort on error).
2828
session.with_transaction(insert_documents)

0 commit comments

Comments
 (0)