From 1180f49fa946bee9bc3c6233a23013f35889d58d Mon Sep 17 00:00:00 2001 From: Cyber MacGeddon Date: Mon, 29 Sep 2025 23:31:26 +0100 Subject: [PATCH] Handle messages properly --- .../trustgraph/storage/triples/cassandra/write.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/trustgraph-flow/trustgraph/storage/triples/cassandra/write.py b/trustgraph-flow/trustgraph/storage/triples/cassandra/write.py index 4ae915cb..b148870c 100755 --- a/trustgraph-flow/trustgraph/storage/triples/cassandra/write.py +++ b/trustgraph-flow/trustgraph/storage/triples/cassandra/write.py @@ -176,15 +176,9 @@ class Processor(TriplesStoreService): self.table = request.user - # Delete all triples for this collection from the unified table - # In the unified table schema, collection is the partition key - delete_cql = """ - DELETE FROM triples - WHERE collection = ? - """ - + # Delete all triples for this collection using the built-in method try: - self.tg.session.execute(delete_cql, (request.collection,)) + self.tg.delete_collection(request.collection) logger.info(f"Deleted all triples for collection {request.collection} from keyspace {request.user}") except Exception as e: logger.error(f"Failed to delete collection data: {e}")