Skip to content

Conversation

roggervalf
Copy link
Collaborator

@roggervalf roggervalf commented Oct 14, 2025

Why

  1. Why is this change necessary? retryIfFailed emits errors in worker, we also emit it in handleFailed method. As we are wrapping handleFailed with retryIfFailed, no need to emit error again but only in one place

How

Enter the implementation details here.

Additional Notes (Optional)

Any extra info here.

@Copilot Copilot AI review requested due to automatic review settings October 14, 2025 03:20
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the retryIfFailed method to use an options object instead of individual parameters and removes redundant error handling code. The change standardizes the retry pattern across the worker class while preventing duplicate error emissions when failures occur in the moveToFinished operation.

  • Refactored retryIfFailed method to accept an options object with delayInMs, maxRetries, and optional span parameters
  • Removed duplicate try-catch block in moveToFinished that was causing redundant error emissions
  • Updated all call sites to use the new options object pattern

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@manast manast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@roggervalf roggervalf merged commit 4b4bd97 into master Oct 16, 2025
24 of 25 checks passed
@roggervalf roggervalf deleted the fix-emit-error-once branch October 16, 2025 00:16
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.

2 participants