Skip to content

Allow jobs to throw retry-after signals - #1386

Merged
asika32764 merged 2 commits into
masterfrom
copilot/windwalker-io-framework-1373-fix-retryafter-throw
Nov 8, 2026
Merged

asika32764 merged 2 commits into
masterfrom
copilot/windwalker-io-framework-1373-fix-retryafter-throw

Conversation

Copilot AI commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

JobController::retryAfter() recorded a delay but returned the controller, so it could not be used to stop job execution with throw. It now returns a dedicated retry signal that middleware handles without treating the job as failed.

  • Usage: Throw the returned signal to stop the job immediately; calls without throw continue to record the retry delay.
    throw $controller->retryAfter(30);
  • Handling: Middleware captures the signal and preserves the retry delay without marking the job failed.
  • Coverage: Added a regression test for stopping job execution with a retry signal.

Co-authored-by: asika32764 <1639206+asika32764@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix $controller->retryAfter(30) cannot throw issue Allow jobs to throw retry-after signals Nov 7, 2026
Copilot AI requested a review from asika32764 November 7, 2026 17:47
@asika32764
asika32764 marked this pull request as ready for review November 8, 2026 03:59
@asika32764
asika32764 merged commit fdf6776 into master Nov 8, 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.

[Queue] $controller->retryAfter(30) cannot throw

2 participants