Skip to content

fix(worker): fail fast on non-retryable exceptions (DEV-52)#10

Merged
RndmCodeGuy20 merged 1 commit into
stagingfrom
fix/worker-retry-classification
Jun 16, 2026
Merged

fix(worker): fail fast on non-retryable exceptions (DEV-52)#10
RndmCodeGuy20 merged 1 commit into
stagingfrom
fix/worker-retry-classification

Conversation

@RndmCodeGuy20

Copy link
Copy Markdown
Owner

Closes DEV-52. Follow-up to DEV-34.

The consumer retried every exception up to max_retries, so a permanent failure (unknown asset type, corrupt file, decode error) burned the whole retry budget before the asset was marked failed.

Fix

Branch on exception type in _handle_job's except: RetryableException keeps the existing retry path (jobs=pending below cap); any other exception fails immediately (jobs=failed + assets=failed) regardless of remaining attempts.

Transient infra errors (DB/Redis/storage timeouts) are not auto-retried unless wrapped in RetryableException — noted as a possible future refinement, kept out of scope here.

🤖 Generated with Claude Code

- Only RetryableException re-queues; other errors fail the job/asset immediately
- Stop burning the full retry budget on permanent failures (bad type, corrupt file)
- Add tests for retryable requeue vs non-retryable fail-fast
@RndmCodeGuy20 RndmCodeGuy20 merged commit 735d6fe into staging Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant