update ingesstion chapters

This commit is contained in:
salahangal 2025-11-19 09:41:40 +01:00
parent 4a14036b01
commit e60e5decdd
3 changed files with 5 additions and 5 deletions

View File

@ -9,7 +9,7 @@ spec:
arguments:
parameters:
- name: book-slug
value: "sahih-bukhari"
value: "al-tirmidhi"
- name: limit
value: "0" # 0 means no limit

View File

@ -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"

View File

@ -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,