Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CHANGES.md 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # Changelog
  2. ## 2.5.0
  3. Those changes are not released yet.
  4. - In the functional API, invoke the wrapped function callback on abort and emit
  5. an `abort` event. This makes it possible to detect when abort is called.
  6. - Add a method on the function API, `call.retryIf(predicate)`, which specifies
  7. a predicate used to determine whether a given error is retriable or not. The
  8. default behavior is unaffected, errors remain retriable by default.
  9. ## 2.4.1
  10. - Add support for specifying the factor to use in the `ExponentialStrategy`.
  11. ## 2.4.0
  12. - Replace `FunctionCall.getResults` by `FunctionCall.getLastResult` to avoid
  13. storing intermediary results forever as this may lead to memory exhaustion
  14. when used in conjunction with an infinite number of backoffs.
  15. - Add `FunctionCall.getNumRetries` which returns the number of times the
  16. wrapped function was retried.
  17. ## 2.3.0
  18. - Add four new methods to `FunctionCall` to query the state of the call.
  19. - isPending
  20. - isRunning
  21. - isCompleted
  22. - isAborted
  23. ## 2.2.0
  24. - To match `Backoff` default behavior, `FunctionCall` no longer sets a
  25. default failAfter of 5, i.e. the maximum number of backoffs is now
  26. unbounded by default.
  27. ## 2.1.0
  28. - `Backoff.backoff` now accepts an optional error argument that is re-emitted
  29. as the last argument of the `backoff` and `fail` events. This provides some
  30. context to the listeners as to why a given backoff operation was attempted.
  31. - The `backoff` event emitted by the `FunctionCall` class now contains, as its
  32. last argument, the error that caused the backoff operation to be attempted.
  33. This provides some context to the listeners as to why a given backoff
  34. operation was attempted.
  35. ## 2.0.0
  36. - `FunctionCall.call` renamed into `FunctionCall.start`.
  37. - `backoff.call` no longer invokes the wrapped function on `nextTick`. That
  38. way, the first attempt is not delayed until the end of the current event
  39. loop.
  40. ## 1.2.1
  41. - Make `FunctionCall.backoffFactory` a private member.
  42. ## 1.2.0
  43. - Add `backoff.call` and the associated `FunctionCall` class.
  44. ## 1.1.0
  45. - Add a `Backoff.failAfter`.
  46. ## 1.0.0
  47. - Rename `start` and `done` events `backoff` and `ready`.
  48. - Remove deprecated `backoff.fibonnaci`.
  49. ## 0.2.1
  50. - Create `backoff.fibonacci`.
  51. - Deprecate `backoff.fibonnaci`.
  52. - Expose fibonacci and exponential strategies.
  53. ## 0.2.0
  54. - Provide exponential and fibonacci backoffs.
  55. ## 0.1.0
  56. - Change `initialTimeout` and `maxTimeout` to `initialDelay` and `maxDelay`.
  57. - Use fibonnaci backoff.