From e60e5decdd2f441e5b06070eae9f88c3b83106cd Mon Sep 17 00:00:00 2001 From: salahangal Date: Wed, 19 Nov 2025 09:41:40 +0100 Subject: [PATCH] update ingesstion chapters --- hadith-ingestion/argo/workflows/ingest-hadithapi.yaml | 2 +- hadith-ingestion/run-full-ingestion.sh | 4 ++-- hadith-ingestion/src/api_clients/hadithapi_client.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hadith-ingestion/argo/workflows/ingest-hadithapi.yaml b/hadith-ingestion/argo/workflows/ingest-hadithapi.yaml index b604ad3..d3844a1 100644 --- a/hadith-ingestion/argo/workflows/ingest-hadithapi.yaml +++ b/hadith-ingestion/argo/workflows/ingest-hadithapi.yaml @@ -9,7 +9,7 @@ spec: arguments: parameters: - name: book-slug - value: "sahih-bukhari" + value: "al-tirmidhi" - name: limit value: "0" # 0 means no limit diff --git a/hadith-ingestion/run-full-ingestion.sh b/hadith-ingestion/run-full-ingestion.sh index 3aeac43..f292403 100755 --- a/hadith-ingestion/run-full-ingestion.sh +++ b/hadith-ingestion/run-full-ingestion.sh @@ -9,9 +9,9 @@ echo "=== Starting Full HadithAPI Ingestion ===" # Books to ingest (in order) BOOKS=( # "sahih-bukhari" - "sahih-muslim" + # "sahih-muslim" # "abu-dawood" - # "al-tirmidhi" + "al-tirmidhi" # "ibn-e-majah" # "sunan-nasai" # "musnad-ahmad" diff --git a/hadith-ingestion/src/api_clients/hadithapi_client.py b/hadith-ingestion/src/api_clients/hadithapi_client.py index bea11ea..09b26b1 100644 --- a/hadith-ingestion/src/api_clients/hadithapi_client.py +++ b/hadith-ingestion/src/api_clients/hadithapi_client.py @@ -265,12 +265,12 @@ class HadithAPIClient(BaseAPIClient): # Process each chapter for chapter in chapters: # logger.warning("Processing chapter", chapter=chapter) - if book_slug == 'sahih-muslim': + if book_slug in {'sahih-muslim','al-tirmidhi','al-silsila-sahiha','al-tirmidhi'}: chapter_id = chapter.get('chapterNumber') else: chapter_id = chapter.get('id') chapter_number = chapter.get('chapterNumber') - + print(chapter_id, chapter_number, chapter.get('name')) logger.info( "fetching_chapter", book_slug=book_slug,