From ba8f24fcbd4f59cad96249d5e073a9222fbb3c00 Mon Sep 17 00:00:00 2001 From: Jarian Cottingham Date: Mon, 2 Feb 2026 09:27:02 -0600 Subject: [PATCH] fix: Update scraper directory path for Docker container compatibility and add debugging --- ai_processor/article_processor.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ai_processor/article_processor.py b/ai_processor/article_processor.py index 2977300..37604ce 100644 --- a/ai_processor/article_processor.py +++ b/ai_processor/article_processor.py @@ -25,7 +25,7 @@ class ArticleProcessor: self.cache_manager = CacheManager(CACHE_FILE) self.batch_size = BATCH_SIZE - def find_unprocessed_articles(self, scraper_dir: str = "/scraper/articles") -> List[Tuple[str, str]]: + def find_unprocessed_articles(self, scraper_dir: str = "/app/articles") -> List[Tuple[str, str]]: """ Find all unprocessed articles in the scraper directory. @@ -38,6 +38,13 @@ class ArticleProcessor: unprocessed_articles = [] try: + # Debug: Check if directory exists + logger.info(f"Checking for articles in: {scraper_dir}") + if not os.path.exists(scraper_dir): + logger.warning(f"Scraper directory does not exist: {scraper_dir}") + return [] + + logger.info(f"Directory exists, walking through files...") for root, dirs, files in os.walk(scraper_dir): for file in files: if file.endswith('.json'):