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

Function get_transaction_status

tests/load-test.py:327–338  ·  view source on GitHub ↗

Get the status of a transaction

(collection_name, transaction_id)

Source from the content-addressed store, hash-verified

325
326
327def get_transaction_status(collection_name, transaction_id):
328 """Get the status of a transaction"""
329 url = (
330 f"{base_url}/collections/{collection_name}/transactions/{transaction_id}/status"
331 )
332 response = requests.get(url, headers=generate_headers(), verify=False)
333 if response.status_code == 200:
334 result = response.json()
335 return result.get("status", "unknown")
336 else:
337 print(f"Failed to get transaction status: {response.status_code}")
338 return "unknown"
339
340
341if __name__ == "__main__":

Callers

nothing calls this directly

Calls 2

generate_headersFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected