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'):