diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-02 21:51:48 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-02 21:51:48 +0300 |
| commit | 29f634d3413924af3a9dd6f89983c29b5320fe66 (patch) | |
| tree | f3dd4f556d770e7e3fca0f822f51162865c35c83 /internal/batch | |
| parent | 993b2efe63e221cee550756770894c9c58474d25 (diff) | |
task 00c/00f: thread context through processor audio/image calls; per-word batch timeout
- Thread ctx context.Context through generateAudio, generateAudioBgBg,
generateAudioWithVoice, generateAudioWithVoiceAndFilename,
generateAudioWithVoiceAndFilenameInDir, and downloadImagesWithTranslation.
Also add ctx to ProcessWordWithTranslationAndType so callers can control
the deadline for the full word-processing pipeline.
- In ProcessBatch, create a context.WithTimeout(5 * time.Minute) per word
so a single hung TTS or image API call cannot block the whole batch run.
Previously both functions created context.Background() internally, making
cancellation impossible.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/batch')
0 files changed, 0 insertions, 0 deletions
