From 73972347a433dbd2d8d2d5265cbaf028723a2267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com> Date: Sun, 8 Oct 2023 19:47:33 +0200 Subject: [PATCH] MAINT: add debugging information --- src/caoscrawler/crawl.py | 2 ++ src/caoscrawler/scanner.py | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/caoscrawler/crawl.py b/src/caoscrawler/crawl.py index ecfefa17..2aeb220c 100644 --- a/src/caoscrawler/crawl.py +++ b/src/caoscrawler/crawl.py @@ -784,6 +784,8 @@ class Crawler(object): for i in reversed(range(len(crawled_data))): if not check_identical(crawled_data[i], identified_records[i]): + logger.debug("Sheduled update because of the folllowing diff:\n" + + str(compare_entities(crawled_data[i], identified_records[i]))) actual_updates.append(crawled_data[i]) return actual_updates diff --git a/src/caoscrawler/scanner.py b/src/caoscrawler/scanner.py index 6f5545b1..3f899a36 100644 --- a/src/caoscrawler/scanner.py +++ b/src/caoscrawler/scanner.py @@ -264,6 +264,8 @@ def scanner(items: list[StructureElement], converters_path = [] for element in items: + element_path =os.path.join(*(structure_elements_path + [element.get_name()])) + logger.debug(f"Dealing with {element_path}") for converter in converters: # type is something like "matches files", replace isinstance with "type_matches" @@ -276,8 +278,7 @@ def scanner(items: list[StructureElement], record_store_copy = record_store.create_scoped_copy() # Create an entry for this matched structure element that contains the path: - general_store_copy[converter.name] = ( - os.path.join(*(structure_elements_path + [element.get_name()]))) + general_store_copy[converter.name] = element_path # extracts values from structure element and stores them in the # variable store -- GitLab