2.4 KiB
2.4 KiB
Changelog
2.5.0
Those changes are not released yet.
- In the functional API, invoke the wrapped function callback on abort and emit
an
abortevent. This makes it possible to detect when abort is called. - Add a method on the function API,
call.retryIf(predicate), which specifies a predicate used to determine whether a given error is retriable or not. The default behavior is unaffected, errors remain retriable by default.
2.4.1
- Add support for specifying the factor to use in the
ExponentialStrategy.
2.4.0
- Replace
FunctionCall.getResultsbyFunctionCall.getLastResultto avoid storing intermediary results forever as this may lead to memory exhaustion when used in conjunction with an infinite number of backoffs. - Add
FunctionCall.getNumRetrieswhich returns the number of times the wrapped function was retried.
2.3.0
- Add four new methods to
FunctionCallto query the state of the call.- isPending
- isRunning
- isCompleted
- isAborted
2.2.0
- To match
Backoffdefault behavior,FunctionCallno longer sets a default failAfter of 5, i.e. the maximum number of backoffs is now unbounded by default.
2.1.0
Backoff.backoffnow accepts an optional error argument that is re-emitted as the last argument of thebackoffandfailevents. This provides some context to the listeners as to why a given backoff operation was attempted.- The
backoffevent emitted by theFunctionCallclass now contains, as its last argument, the error that caused the backoff operation to be attempted. This provides some context to the listeners as to why a given backoff operation was attempted.
2.0.0
FunctionCall.callrenamed intoFunctionCall.start.backoff.callno longer invokes the wrapped function onnextTick. That way, the first attempt is not delayed until the end of the current event loop.
1.2.1
- Make
FunctionCall.backoffFactorya private member.
1.2.0
- Add
backoff.calland the associatedFunctionCallclass.
1.1.0
- Add a
Backoff.failAfter.
1.0.0
- Rename
startanddoneeventsbackoffandready. - Remove deprecated
backoff.fibonnaci.
0.2.1
- Create
backoff.fibonacci. - Deprecate
backoff.fibonnaci. - Expose fibonacci and exponential strategies.
0.2.0
- Provide exponential and fibonacci backoffs.
0.1.0
- Change
initialTimeoutandmaxTimeouttoinitialDelayandmaxDelay. - Use fibonnaci backoff.