MCPcopy Create free account
hub / github.com/cosdata/cosdata / commit_transaction

Function commit_transaction

tests/load-test.py:155–163  ·  view source on GitHub ↗
(collection_name, transaction_id)

Source from the content-addressed store, hash-verified

153
154
155def commit_transaction(collection_name, transaction_id):
156 url = (
157 f"{base_url}/collections/{collection_name}/transactions/{transaction_id}/commit"
158 )
159 response = requests.post(url, headers=generate_headers(), verify=False)
160 if response.status_code not in [200, 204]:
161 print(f"Error response: {response.text}")
162 raise Exception(f"Failed to commit transaction: {response.status_code}")
163 return None
164
165
166def abort_transaction(collection_name, transaction_id):

Callers 1

load-test.pyFile · 0.70

Calls 1

generate_headersFunction · 0.70

Tested by

no test coverage detected