Files
hejyou_content_creation/app.py
Tim Leikauf 9c8ec853f6 refactor: replace _ensure_junction/_ensure_link with batch Directus ops in generate_questions
- Remove per-call _ensure_junction (junction tables already exist)
- Load existing word/question links upfront (2 GET requests instead of N)
- Batch POST all new words_objects links in a single request
- Batch POST related_words and distractor_words per new question
- Eliminates O(N) serial GET+POST pattern in favour of O(1) upfront dedup + batch writes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 22:14:28 +02:00

65 KiB