(collection_name, transaction_id)
| 144 | |
| 145 | |
| 146 | def 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 | |
| 157 | def abort_transaction(collection_name, transaction_id): |
no test coverage detected