Tags: neonwatty/meme-search
Tags
Fix image-to-text service stalling on invalid images (#145) * Fix image-to-text service stalling on invalid images (#144) The service was retrying forever when encountering missing, corrupt, or oversized images. This fix adds graceful error handling with proper failure notifications. Changes: - Add errors.py with PermanentError/TransientError classification - Add image validation (file exists, size < 10MB, valid image format) - Implement retry logic with exponential backoff (5s, 10s, 20s) for transient errors only - Add failure_sender to notify Rails of permanent failures (status=5) - Add retry_count column to job queue with migration support - Remove failed jobs from queue instead of infinite retry Test coverage: - 111 unit tests (including new error handling tests) - 7 integration tests (including missing/corrupt image tests) - Manual Docker testing confirmed fix works end-to-end Closes #144 * Bump version to 2.0.2 * Add release workflow for version tags --------- Co-authored-by: Jeremy Watt <neonwatty@Jeremys-Mac-mini.local>