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

Function get_transaction_status

tests/rps-test.py:266–277  ·  view source on GitHub ↗

Get the status of a transaction

(collection_name, transaction_id)

Source from the content-addressed store, hash-verified

264
265
266def get_transaction_status(collection_name, transaction_id):
267 """Get the status of a transaction"""
268 url = (
269 f"{base_url}/collections/{collection_name}/transactions/{transaction_id}/status"
270 )
271 response = requests.get(url, headers=generate_headers(), verify=False)
272 if response.status_code == 200:
273 result = response.json()
274 return result.get("status", "unknown")
275 else:
276 print(f"Failed to get transaction status: {response.status_code}")
277 return "unknown"
278
279
280if __name__ == "__main__":

Callers

nothing calls this directly

Calls 2

generate_headersFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected