-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Asynchronous retries 'whenFailure' broken in 0.4? #5
Comments
Your listener should only get called if The current API in master is a bit different than from the last release. The listener now accepts a result and a failure since failure could indicate an exception being thrown or a bad result being returned. That said, the listener is called as expected in the test. Let me know what you think. |
I assumed that a exceeded retry policy would trigger the failure event. I use your library on a udp protocol, since there is not always a result. My solution at the moment is that I check the result to be present. If there no result, it must be a timeout. A "retryExceeded"-Handler would be nice. Thank you! |
@Haardt I know this is an old issue, but I wanted to dig it back up again to make sure I understand your use case. Basically, you'd like your failure handler to be called if retries are exceeded and some unexpected result occurred? The unexpected result bit is important because that's how Recurrent knows to keep trying. Maybe an example policy:
This would perform retries so long as the result is |
Also - See the new event listeners API that allows you to listen specifically for onCompleted, onFailed, etc. events: |
Hi,
when the retry policy is exceeded, the failure function is not called. Can you make a new release of the master brunch? - (perhaps the bug is corrected.)
The text was updated successfully, but these errors were encountered: