Fix pathing issue for article directory - use relative path ../scraper/articles
This commit is contained in:
parent
ad2ef2a87b
commit
b8228d8e07
@ -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 = "/app/articles") -> List[Tuple[str, str]]:
|
||||
def find_unprocessed_articles(self, scraper_dir: str = "../scraper/articles") -> List[Tuple[str, str]]:
|
||||
"""
|
||||
Find all unprocessed articles in the scraper directory.
|
||||
|
||||
@ -44,6 +44,7 @@ class ArticleProcessor:
|
||||
logger.warning(f"Scraper directory does not exist: {scraper_dir}")
|
||||
# Try alternative paths
|
||||
alternative_paths = [
|
||||
"../scraper/articles",
|
||||
"/scraper/articles",
|
||||
"/app/articles",
|
||||
"/articles"
|
||||
@ -149,7 +150,7 @@ class ArticleProcessor:
|
||||
logger.info(f"Batch completed: {successful} successful, {failed} failed")
|
||||
return successful, failed
|
||||
|
||||
def process_all_articles(self, scraper_dir: str = "/scraper/articles") -> dict:
|
||||
def process_all_articles(self, scraper_dir: str = "../scraper/articles") -> dict:
|
||||
"""
|
||||
Process all unprocessed articles in the scraper directory.
|
||||
|
||||
@ -212,7 +213,7 @@ class ArticleProcessor:
|
||||
|
||||
return stats
|
||||
|
||||
def process_new_articles(self, scraper_dir: str = "/scraper/articles") -> dict:
|
||||
def process_new_articles(self, scraper_dir: str = "../scraper/articles") -> dict:
|
||||
"""
|
||||
Process only new articles (those that haven't been processed yet).
|
||||
This is designed for real-time processing of new articles.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user