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):
11631163 # Step 2: Start a client session.
11641164 async with client .start_session () as session :
11651165 # 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 )
11721167
11731168 # End Transactions withTxn API Example 1
11741169
Original file line number Diff line number Diff line change @@ -1161,12 +1161,7 @@ def callback(session):
11611161 # Step 2: Start a client session.
11621162 with client .start_session () as session :
11631163 # 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 )
11701165
11711166 # End Transactions withTxn API Example 1
11721167
You can’t perform that action at this time.
0 commit comments