Skip to content

Add optional retry-on-timeout handling - #171

Merged
Graeme22 merged 1 commit into
tastyware:masterfrom
Poyraxx:poyrax/retry-on-timeout
Jun 17, 2026
Merged

Add optional retry-on-timeout handling#171
Graeme22 merged 1 commit into
tastyware:masterfrom
Poyraxx:poyrax/retry-on-timeout

Conversation

@Poyraxx

@Poyraxx Poyraxx commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a retry_on_timeout flag to task and cron registration
  • route worker-enforced timeouts through the normal retry flow when that flag is enabled
  • document the new option and cover it with a task timeout retry test

Why

Issue #109 points out that worker timeouts currently fail immediately, which makes per-task retry behavior awkward when the built-in timeout is the thing that fires. This keeps the existing default behavior intact while adding an opt-in path for tasks that should retry after a timeout.

Root cause

Worker-enforced timeouts were converted straight into TimeoutError results, so they never entered the same retry path used by StreaqRetry.

Validation

  • python -m compileall streaq tests

Closes #109.

@Poyraxx
Poyraxx marked this pull request as ready for review June 3, 2026 18:55
@Graeme22

Copy link
Copy Markdown
Member

Hi, thanks for the contribution and sorry for the delay in reviewing! I was a bit hesitant to add this initially but given 2 different people have asked for it I guess it's worthwhile. LGTM!

@Graeme22
Graeme22 merged commit 2719114 into tastyware:master Jun 17, 2026
5 checks passed
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.

Possibility of retrying after task timeout

2 participants