MCPcopy
hub / github.com/tortoise/tortoise-orm / create_in_transaction

Function create_in_transaction

tests/test_concurrency.py:66–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64 """Test concurrent transactions with multiple operations."""
65
66 async def create_in_transaction():
67 async with in_transaction():
68 await asyncio.gather(*[Tournament.create(name="Test") for _ in range(100)])
69
70 await asyncio.gather(*[create_in_transaction() for _ in range(10)])
71 count = await Tournament.all().count()

Calls 2

in_transactionFunction · 0.90
createMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…