From f9553edb15db16c157ebc1db3f7855a085ca346b Mon Sep 17 00:00:00 2001 From: "Michael F." Date: Fri, 29 Dec 2023 16:05:50 +0100 Subject: [PATCH] remove logging code to detect log duplicates --- src/graphsenselib/db/cassandra.py | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/src/graphsenselib/db/cassandra.py b/src/graphsenselib/db/cassandra.py index 497a237..d413d90 100644 --- a/src/graphsenselib/db/cassandra.py +++ b/src/graphsenselib/db/cassandra.py @@ -509,35 +509,6 @@ def ingest( if auto_none_to_unset: items = [none_to_unset(row) for row in items] - if table == "log": - x = [ - item - for item in items - if len(item["topics"]) % 2 == 0 - and len(item["topics"]) > 0 - and item["topics"][: len(item["topics"]) // 2] - == item["topics"][len(item["topics"]) // 2 :] - ] - if len(x) > 0: - logger.warning(x) - # from collections import defaultdict - - # dic = defaultdict(int) - # for i in items: - # dic[ - # ( - # i["block_id_group"], - # i["block_id"], - # i["topic0"].hex(), - # i["log_index"], - # ) - # ] += 1 - - # assert len([v for v in dic.values() if v > 1]) == 0 - blks = [it["block_id"] for it in items if "block_id" in it] - if len(blks) > 0: - logger.debug(f"{table}," f" {min(blks)}, {max(blks)}, {len(items)}") - self._exe_with_retries(stmt, items, concurrency=concurrency) @needs_session