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

Function commit_transaction

tests/rps-test.py:146–154  ·  view source on GitHub ↗
(collection_name, transaction_id)

Source from the content-addressed store, hash-verified

144
145
146def commit_transaction(collection_name, transaction_id):
147 url = (
148 f"{base_url}/collections/{collection_name}/transactions/{transaction_id}/commit"
149 )
150 response = requests.post(url, headers=generate_headers(), verify=False)
151 if response.status_code not in [200, 204]:
152 print(f"Error response: {response.text}")
153 raise Exception(f"Failed to commit transaction: {response.status_code}")
154 return None
155
156
157def abort_transaction(collection_name, transaction_id):

Callers 2

rps-test.pyFile · 0.70

Calls 1

generate_headersFunction · 0.70

Tested by

no test coverage detected