File tree Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -1163,12 +1163,7 @@ async def callback(session):
1163
1163
# Step 2: Start a client session.
1164
1164
async with client .start_session () as session :
1165
1165
# Step 3: Use with_transaction to start a transaction, execute the callback, and commit (or abort on error).
1166
- await session .with_transaction (
1167
- callback ,
1168
- read_concern = ReadConcern ("local" ),
1169
- write_concern = wc_majority ,
1170
- read_preference = ReadPreference .PRIMARY ,
1171
- )
1166
+ await session .with_transaction (callback )
1172
1167
1173
1168
# End Transactions withTxn API Example 1
1174
1169
Original file line number Diff line number Diff line change @@ -1161,12 +1161,7 @@ def callback(session):
1161
1161
# Step 2: Start a client session.
1162
1162
with client .start_session () as session :
1163
1163
# Step 3: Use with_transaction to start a transaction, execute the callback, and commit (or abort on error).
1164
- session .with_transaction (
1165
- callback ,
1166
- read_concern = ReadConcern ("local" ),
1167
- write_concern = wc_majority ,
1168
- read_preference = ReadPreference .PRIMARY ,
1169
- )
1164
+ session .with_transaction (callback )
1170
1165
1171
1166
# End Transactions withTxn API Example 1
1172
1167
You can’t perform that action at this time.
0 commit comments