@creejs/commons-retrier
Version:
Common Utils About Task Retrying
3 lines (2 loc) • 21.1 kB
JavaScript
var t=function(t,...e){if(null==t)throw new TypeError('"target" must not be null or undefined');for(const s of e)if(null!=s)for(const e in s)void 0===t[e]&&(t[e]=s[e]);return t};var e={isNumber:r,isNil:s};function s(t){return null==t}function r(t){return null!=t&&"number"==typeof t}function n(t){return null!=t&&"function"==typeof t.then}var i={assertNumber:a,assertPositive:function(t,e){if(!function(t){return!!r(t)&&t>0}(t))throw new Error(`${e?'"'+e+'" ':" "}Not Positive: ${t}`)},assertNotNegative:function(t,e){if(!function(t){return!!r(t)&&t>=0}(t))throw new Error(`${e?'"'+e+'" ':" "}Not "0 or Positive": ${t}`)},assertFunction:l,assertNotNil:function(t,e){if(s(t))throw new Error((e?'"'+e+'" ':" ")+"Should Not Nil")},assertString:function(t,e){if(!function(t){return null!=t&&"string"==typeof t}(t))throw new Error(`${e?'"'+e+'" ':" "}Not String: type=${typeof t} value=${JSON.stringify(t)}`)}};function o(t,e){if(!Array.isArray(t))throw new Error(`${e?e+"":" "}Not Array: type=${typeof t} value=${JSON.stringify(t)}`)}function a(t,e){if(!r(t))throw new Error(`${e?'"'+e+'" ':" "}Not Number: type=${typeof t} value=${JSON.stringify(t)}`)}function l(t,e){if(!function(t){return"function"==typeof t}(t))throw new Error(`${e?'"'+e+'" ':" "}Not Function: type=${typeof t} value=${JSON.stringify(t)}`)}function c(t,e){if(!n(t))throw new Error(`${e?'"'+e+'" ':" "}Not Promise: type=${typeof t} value=${JSON.stringify(t)}`)}var h={defer:u,delay:function(t,e){r(t)?(e=t,t=Promise.resolve()):null==t&&null==e&&(e=1,t=Promise.resolve()),null!=t&&c(t),a(e=e??1e3);const s=u(),n=Date.now();return t.then((...t)=>{const r=Date.now()-n;r<e?setTimeout(()=>s.resolve(...t),e-r):s.resolve(...t)}).catch(t=>{const r=Date.now()-n;r<e?setTimeout(()=>s.reject(t),e-r):s.reject(t)}),s.promise},timeout:function(t,e,s){c(t),a(e=e??1);const r=u(e,s),n=Date.now();return t.then((...t)=>{Date.now()-n<=e?r.resolve(...t):r.reject(new Error(s??`Promise Timeout: ${e}ms`))}).catch(t=>{!r.resolved&&!r.rejected&&r.reject(t)}),r.promise},allSettled:m,returnValuePromised:_,series:async function(t){o(t);const e=[];for(const s of t)l(s),e.push(await s());return e},seriesAllSettled:async function(t){o(t);const e=[];for(const s of t){l(s);try{e.push({ok:!0,result:await s()})}catch(t){e.push({ok:!1,result:t})}}return e},parallel:async function(t,e=5){if(o(t),a(e),e<=0)throw new Error(`Invalid maxParallel: ${e}, should > 0`);t.forEach(t=>l(t));const s=[];if(t.length<=e){const e=await Promise.all(t.map(t=>_(t)));return s.push(...e),s}const r=[];for(const n of t)if(l(n),r.push(n),r.length>=e){const t=await Promise.all(r.map(t=>_(t)));s.push(...t),r.length=0}if(r.length>0&&r.length<e){const t=await Promise.all(r.map(t=>_(t)));s.push(...t)}return s},parallelAllSettled:async function(t,e=5){if(o(t),a(e),e<=0)throw new Error(`Invalid maxParallel: ${e}, should > 0`);t.forEach(t=>l(t));const s=[];if(t.length<=e){const e=await m(t.map(t=>_(t)));return s.push(...e),s}const r=[];for(const n of t)if(l(n),r.push(n),r.length>=e){const t=await m(r.map(t=>_(t)));s.push(...t),r.length=0}if(r.length>0&&r.length<e){const t=await m(r.map(t=>_(t)));s.push(...t)}return s}};function u(t=-1,e){a(t);const s={};let r;return t>=0&&(s.timerHandler=r=setTimeout(()=>{clearTimeout(r),s.timerCleared=!0,s.reject(new Error(e??`Promise Timeout: ${t}ms`))},t),s.timerHandler=r),s.promise=new Promise((t,e)=>{s.resolve=(...e)=>{null!=r&&(clearTimeout(r),s.timerCleared=!0),s.resolved=!0,t(...e)},s.reject=t=>{null!=r&&(clearTimeout(r),s.timerCleared=!0),s.rejected=!0,e(t)}}),s.promise.cancel=()=>{null!=r&&(clearTimeout(r),s.timerCleared=!0),s.rejected=!0,s.canceled=s.promise.canceled=!0,s.reject(new Error("Cancelled"))},s}async function m(t){o(t);const e=await Promise.allSettled(t),s=[];for(const t of e)"fulfilled"===t.status&&s.push({ok:!0,result:t.value}),"rejected"===t.status&&s.push({ok:!1,result:t.reason});return s}function _(t){try{const e=t();return n(e)?e:Promise.resolve(e)}catch(t){return Promise.reject(t)}}const{assertPositive:f,assertNotNegative:w}=i,{isNumber:p}=e;class d{constructor(){this._min=50,this._max=3e4,this._nextInterval=this._min,this._jitter=0}get jitter(){return this._jitter}set jitter(t){w(t,"jitter"),this._jitter=t}copyPolicySettingTo(t){t.range(this._min,this._max),t._nextInterval=this._nextInterval}range(t,e){if(f(t,"min"),f(e,"max"),t>=e)throw new Error("min must < max");return this._min=t,this._nextInterval<this._min&&(this._nextInterval=this._min),this._max=e,this._nextInterval>this._max&&(this._nextInterval=this._max),this}min(t){if(f(t,"min"),t>=this._max)throw new Error("min must < max");return this._min=t,this._nextInterval=this._min,this}max(t){if(f(t,"max"),t<=this._min)throw new Error("max must > min");return this._max=t,this._nextInterval>this._max&&(this._nextInterval=this._max),this}reset(){return this._nextInterval=this._min,this}generate(t){const e=this._nextInterval;return this._increase(t),e}_increase(t){const e=this._next(t);if(!p(e))throw new Error("Generated Next Interval Not Number");const s=this._jitter<=0?e:e+Math.floor(Math.random()*this._jitter);return s<this._min?this._nextInterval=this._min:s>this._max?this._nextInterval=this._max:this._nextInterval=s}_next(t){throw new Error("Not Impled Yet")}}var g={isFunction:v,isNil:y};function v(t){return"function"==typeof t}function y(t){return null==t}function x(t){return null!=t&&"string"==typeof t}var k={assertNumber:function(t,e){if(!function(t){return null!=t&&"number"==typeof t}(t))throw new Error(`${e?'"'+e+'" ':" "}Not Number: type=${typeof t} value=${JSON.stringify(t)}`)},assertFunction:function(t,e){if(!v(t))throw new Error(`${e?'"'+e+'" ':" "}Not Function: type=${typeof t} value=${JSON.stringify(t)}`)},assertNotNil:function(t,e){if(y(t))throw new Error((e?'"'+e+'" ':" ")+"Should Not Nil")},assertString:function(t,e){if(!x(t))throw new Error(`${e?'"'+e+'" ':" "}Not String: type=${typeof t} value=${JSON.stringify(t)}`)},assertStringOrSymbol:function(t,e){if(!x(t)&&!function(t){return null!=t&&"symbol"==typeof t}(t))throw new Error(`${e?'"'+e+'" ':" "}Not String or Symbol: type=${typeof t} value=${JSON.stringify(t)}`)}};const L="DOwner$#$",{assertFunction:b,assertNotNil:N}=k;class E{constructor(t,e,s=!1){N(t,"event"),b(e,"callback"),this._event=t,this._callback=e,this._isOnce=!!s,this._owner=void 0}set owner(t){this._owner=t}get owner(){return this._owner===L?void 0:this._owner}get event(){return this._event}get isOnce(){return this._isOnce}isSameCallback(t){return this._callback===t}get callback(){return this._callback}invoke(...t){try{return this._callback(...t)}finally{if(this._isOnce)try{this._event._remove(this)}catch(t){console.warn(t)}}}listener(...t){return this.invoke(...t)}}const{isFunction:S,isNil:O}=g,{assertStringOrSymbol:R,assertFunction:$}=k;class T{static get DefaultOwner(){return L}constructor(t){R(t,"eventName"),this._name=t,this._callbacks=new Set,this._listeners=[],this._callback2Listeners=new Map,this._listener2Owner=new Map,this._owner2Listeners=new Map}get name(){return this._name}isEmpty(){return 0===this._callbacks.size}rawListeners(){return[...this._listeners]}listenerCount(t){return null==t?this._listeners.length:this._callback2Listeners.get(t)?.size??0}callbacks(){return[...this.rawListeners().map(t=>t.callback)]}emit(...t){if(0===this._listeners.length)return!1;for(const e of[...this._listeners])e.invoke(...t);return!0}hasListener(t){return!!S(t)&&this._callbacks.has(t)}hasOwner(t){return!O(t)&&this._owner2Listeners.has(t)}addListener(t,e){return this._addListener(t,e,!1,!1)}prependListener(t,e){return this._addListener(t,e,!1,!0)}addOnceListener(t,e){return this._addListener(t,e,!0,!1)}prependOnceListener(t,e){return this._addListener(t,e,!0,!0)}_addListener(t,e,s,r){if(O(t))return!1;$(t),this._callbacks.has(t)||this._callbacks.add(t),e=e??L;const n=new E(this,t,s);n.owner=e,r?this._listeners.unshift(n):this._listeners.push(n),this._listener2Owner.set(n,e);let i=this._callback2Listeners.get(t);null==i&&(i=new Set,this._callback2Listeners.set(t,i)),i.add(n);let o=this._owner2Listeners.get(e);return null==o&&(o=new Set,this._owner2Listeners.set(e,o)),o.add(n),!0}removeListener(t){if(O(t))return!1;if(!this._callbacks.has(t))return!1;this._callbacks.delete(t);const e=this._callback2Listeners.get(t);if(null==e)return!1;this._callback2Listeners.delete(t);for(const t of e){-1!==this._listeners.indexOf(t)&&this._listeners.splice(this._listeners.indexOf(t),1);const e=this._listener2Owner.get(t);if(null==e)continue;this._listener2Owner.delete(t);const s=this._owner2Listeners.get(e);null!=s&&(s.delete(t),0===s.size&&this._owner2Listeners.delete(e))}return!0}_remove(t){const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1);const{callback:s}=t,r=this._callback2Listeners.get(s);null!=r&&(r.delete(t),0===r.size&&(this._callback2Listeners.delete(s),this._callbacks.delete(s)));const n=this._listener2Owner.get(t);if(null==n)return;this._listener2Owner.delete(t);const i=this._owner2Listeners.get(n);null!=i&&(i.delete(t),0===i.size&&this._owner2Listeners.delete(n))}removeAllListeners(t){if(O(t))return this._callbacks.clear(),this._listeners.length=0,this._callback2Listeners.clear(),this._listener2Owner.clear(),this._owner2Listeners.clear(),this;const e=this._owner2Listeners.get(t);if(null==e)return this;this._owner2Listeners.delete(t);for(const t of e){-1!==this._listeners.indexOf(t)&&this._listeners.splice(this._listeners.indexOf(t),1),this._listener2Owner.delete(t);const{callback:e}=t,s=this._callback2Listeners.get(e);null!=s&&(s.delete(t),0===s.size&&(this._callback2Listeners.delete(e),this._callbacks.delete(e)))}return this}}const{isNil:F}=g,{assertString:P,assertFunction:I,assertNumber:j,assertStringOrSymbol:M,assertNotNil:C}=k,A=["on","once","addListener","prependListener","prependOnceListener","off","offAll","offOwner","removeAllListeners","removeListener","emit","setMaxListeners","getMaxListeners","hasOwner","listeners","listenerCount","eventNames","rawListeners"];let D=10;class B{static mixin(t){const e=new B;t.__emitter=e;for(const s of A){const r=e[s];t[s]=r.bind(e)}return t}static get defaultMaxListeners(){return D}static set defaultMaxListeners(t){j(t),D=t??10}constructor(){this._name2Event=new Map,this._maxListeners=D}addListener(t,e,s){return this.on(t,e,s)}prependListener(t,e,s){return P(t),I(e),this._checkMaxListeners(t),this._getOrCreateEvent(t).prependListener(e,s),this}prependOnceListener(t,e,s){return P(t),I(e),this._checkMaxListeners(t),this._getOrCreateEvent(t).prependOnceListener(e,s),this}emit(t,...e){const s=this._name2Event.get(t);return null!=s&&!s.isEmpty()&&(s.emit(...e),!0)}eventNames(){return[...this._name2Event.keys()]}getMaxListeners(){return this._maxListeners}listenerCount(t,e){M(t,"eventName");const s=this._name2Event.get(t);return null==s||s.isEmpty()?0:s.listenerCount(e)}listeners(t){M(t,"eventName");const e=this._name2Event.get(t);return null==e||e.isEmpty()?[]:e.callbacks()}off(t,e){const s=this._name2Event.get(t);return null==s?this:(s.removeListener(e),s.isEmpty()?(this._name2Event.delete(t),this):this)}offAll(t,e){M(t,"eventName");const s=this._name2Event.get(t);return null==s?this:(s.removeAllListeners(e),s.isEmpty()?(this._name2Event.delete(t),this):this)}offOwner(t){C(t,"owner");const e=[...this._name2Event.values()];for(const s of e)s.removeAllListeners(t),s.isEmpty()&&this._name2Event.delete(s.name);return this}on(t,e,s){return P(t),I(e),this._checkMaxListeners(t),this._getOrCreateEvent(t).addListener(e,s),this}_checkMaxListeners(t){let e=0;0!==this._maxListeners&&this._maxListeners!==1/0&&(e=this.listenerCount(t))>=this._maxListeners&&console.warn(`maxlistenersexceededwarning: Possible EventEmitter memory leak detected. ${e} ${t} listeners added to [${this}]. Use emitter.setMaxListeners() to increase limit`)}once(t,e,s){return P(t),I(e),this._getOrCreateEvent(t).addOnceListener(e,s),this}rawListeners(t){return this._name2Event.get(t)?.rawListeners()||[]}removeAllListeners(t,e){return this.offAll(t,e)}removeListener(t,e){return this.off(t,e)}setMaxListeners(t){if(j(t),t<0)throw new RangeError("maxListeners must >=0");return this._maxListeners=t,this}_getOrCreateEvent(t){if(this._name2Event.has(t))return this._name2Event.get(t);const e=new T(t);return this._name2Event.set(t,e),e}hasOwner(t){if(F(t))return!1;for(const e of this._name2Event.values())if(e.hasOwner(t))return!0;return!1}}var J={Start:"start",Retry:"retry",Success:"success",Failure:"failure",Timeout:"timeout",TaskTimeout:"task-timeout",Stop:"stop",Completed:"complete",MaxRetries:"max-retries"};const{assertPositive:z}=i;class H extends d{constructor(t){super(),z(t,"interval"),this._interval=t}set interval(t){z(t,"interval"),this._interval=t}get interval(){return this._interval}_next(t){return this.interval}}const{assertPositive:G}=i;class U extends d{constructor(t){super(),G(t,"increasement"),this._increasement=t}set increasement(t){G(t,"increasement"),this._increasement=t}get increasement(){return this._increasement}_next(t){return this._nextInterval>=this._max?this._max:this._nextInterval+this.increasement}}const{assertPositive:V}=i;class Y extends d{constructor(t){if(super(),V(t,"factor"),t<1)throw new Error("factor must be >= 1");this._factor=t}set factor(t){if(V(t,"factor"),t<1)throw new Error("factor must be >= 1");this._factor=t}get factor(){return this._factor}_next(t){return this._nextInterval>=this._max?this._max:this._nextInterval*this.factor}}const{assertPositive:q}=i;class K extends d{constructor(t){super(),q(t,"stepLength"),this._stepLength=t,this.increasement=t}set stepLength(t){q(t,"stepLength"),this._stepLength=t,this.increasement=t}get stepLength(){return this._stepLength}_next(t){const e=this._nextInterval+this.increasement;return e>=this._max?(this.increasement=-this.stepLength,this._max):e<=this._min?(this.increasement=this.stepLength,this._min):e}}const{assertNotNil:Q,assertFunction:W}=i;class X{constructor(t,e){Q(t,"retrier"),W(e,"task"),this.retrier=t,this.task=e,this.result=void 0,this.error=void 0}get failed(){return null!=this.error}get succeeded(){return null==this.error}async execute(t,e,s){try{this.result=await this.task(t,e,s),this.error=void 0}catch(t){this.error=t}}dispose(){this.retrier=void 0}}class Z extends X{static isAlwaysTask(t){return t instanceof Z}constructor(t,e,s){super(t,e),this.resetPolicy=s}async execute(t,e,s){await super.execute(t,e,s),this.succeeded&&this.resetPolicy&&this.retrier.resetRetryPolicy()}}const{assertNotNegative:tt}=i;class et extends H{constructor(t,e=500){super(t),tt(e,"jitter"),this._jitter=e??500}}const{assertNotNegative:st}=i;class rt extends Y{constructor(t=500){super(2),st(t,"jitter"),this._jitter=t??500}}const{assertNotNegative:nt}=i;class it extends U{constructor(t,e=500){super(t),nt(e,"jitter"),this._jitter=e??500}}const{assertPositive:ot,assertString:at,assertFunction:lt,assertNumber:ct}=i,{isNil:ht}=e,ut="!#@%$&^*";class mt{constructor(t){B.mixin(this),this._policy=new H(t??1e3),this._maxRetries=3,this._currentRetries=1,this._timeout=12e4,this._taskTimeout=2e3,this._name="unamed",this._taskingFlag=void 0,this._breakFlag=void 0,this._breakReason=void 0}get running(){return!ht(this._taskingFlag)}name(t){return at(t,"retrierName"),this._name=t,this}infinite(){return this._maxRetries=1/0,this}times(t){return this.maxRetries(t)}maxRetries(t){return ot(t,"maxRetries"),this._maxRetries=t,this}min(t){return this._policy.min(t),this}max(t){return this._policy.max(t),this}range(t,e){return this._policy.range(t,e),this}fixedInterval(t){const e=this._policy;if(e instanceof H)return e.interval=t,this;const s=new H(t);return e?.copyPolicySettingTo(s),s.reset(),this._policy=s,this}fixedBackoff(t,e=500){const s=this._policy;if(s instanceof H)return s.interval=t,s.jitter=e,this;const r=new et(t,e);return s?.copyPolicySettingTo(r),r.reset(),this._policy=r,this}fixedIncrease(t){const e=this._policy;if(e instanceof U)return e.increasement=t,this;const s=new U(t);return e?.copyPolicySettingTo(s),s.reset(),this._policy=s,this}linearBackoff(t,e=500){const s=this._policy;if(s instanceof it)return s.increasement=t,s.jitter=e,this;const r=new it(t,e);return s?.copyPolicySettingTo(r),r.reset(),this._policy=r,this}factorIncrease(t){const e=this._policy;if(e instanceof Y)return e.factor=t,this;const s=new Y(t);return e?.copyPolicySettingTo(s),s.reset(),this._policy=s,this}exponentialBackoff(t=500){const e=this._policy;if(e instanceof rt)return e.jitter=t,this;const s=new rt(t);return e?.copyPolicySettingTo(s),s.reset(),this._policy=s,this}shuttleInterval(t){const e=this._policy;if(e instanceof K)return e.stepLength=t,this;const s=new K(t);return e?.copyPolicySettingTo(s),s.reset(),this._policy=s,this}taskTimeout(t){return ot(t,"timeout"),this._taskTimeout=t,this}timeout(t){return ct(t,"timeout"),this._timeout=t,this}task(t){return lt(t,"task"),this._task=new X(this,t),this}retry(t){return this.task(t),this}always(t,e=!1){return this._task=new Z(this,t,e),this}async start(){if(null==this._task)throw new Error("No Task to Retry");if(null!=this._taskingFlag)return this._taskingFlag.promise;const t=Date.now();let e=null;this.emit(J.Start,t),this._taskingFlag=h.defer();let s=null;for(;;){if(null!=this._breakFlag){this._taskingFlag.reject(this._breakReason);break}if(s=Date.now()-t,!_t(this._timeout)&&s>=this._timeout){if(this.emit(J.Timeout,this._currentRetries,s,this._timeout),Z.isAlwaysTask(this._task)){this._taskingFlag.resolve();break}this._taskingFlag.reject(e??new Error(`Timeout "${this._timeout}" Exceeded`));break}this.emit(J.Retry,this._currentRetries,s);const r=this._task,n=this._policy.generate(this._currentRetries);try{try{await h.timeout(r.execute(this._currentRetries,s,n),this._taskTimeout,ut)}catch(t){throw t.message===ut&&this.emit(J.TaskTimeout,this._currentRetries,s,this._taskTimeout),t}if(r.failed)throw e=r.error,r.error;const t=r.result;if(this.emit(J.Success,t,this._currentRetries,s),!Z.isAlwaysTask(r)){this._taskingFlag.resolve(t);break}}catch(t){this.emit(J.Failure,t,this._currentRetries,s)}const i=++this._currentRetries;if(this._currentRetries>this._maxRetries){if(this.emit(J.MaxRetries,i,this._maxRetries),Z.isAlwaysTask(r)){this._taskingFlag.resolve();break}this._taskingFlag.reject(e??new Error(`Max Retries Exceeded, Retring ${this._currentRetries} times > max ${this._maxRetries}`));break}await h.delay(n)}return this._taskingFlag.promise.finally(()=>{this.resetRetryPolicy(),this._taskingFlag=void 0;const e=Date.now()-t;this.emit(J.Completed,this._currentRetries,e)}),this._taskingFlag.promise}async stop(t){if(this.emit(J.Stop,t),null!=this._taskingFlag)return null!=this._breakFlag||(this._breakFlag=h.defer(),this._breakReason=t??new Error("Manually Stop"),this.once(J.Completed,()=>{this._breakFlag.resolve()}),this._breakFlag.promise.finally(()=>{this._breakFlag=void 0,this._breakReason=void 0})),this._breakFlag.promise}resetRetryPolicy(){this._policy.reset()}onRetry(t){return this.on(J.Retry,t),this}onError(t){return this.on(J.Error,t),this}onFailure(t){return this.on(J.Failure,t),this}onSuccess(t){return this.on(J.Success,t),this}onStart(t){return this.on(J.Start,t),this}onStop(t){return this.on(J.Stop,t),this}onTimeout(t){return this.on(J.Timeout,t),this}onTaskTimeout(t){return this.on(J.TaskTimeout,t),this}onCompleted(t){return this.on(J.Completed,t),this}onMaxRetries(t){return this.on(J.MaxRetries,t),this}}function _t(t){return t<=0||t===1/0}function ft(t){const e=new mt;return e.name(t),e}function wt(){const t=new mt;return t.infinite(),t}function pt(t){const e=new mt;return e.times(t),e}function dt(t){const e=new mt;return e.maxRetries(t),e}function gt(t){const e=new mt;return e.min(t),e}function vt(t){const e=new mt;return e.max(t),e}function yt(t,e){const s=new mt;return s.range(t,e),s}function xt(t){const e=new mt;return e.fixedInterval(t),e}function kt(t,e=500){const s=new mt;return s.fixedBackoff(t,e),s}function Lt(t){const e=new mt;return e.fixedIncrease(t),e}function bt(t,e=500){const s=new mt;return s.linearBackoff(t,e),s}function Nt(t){const e=new mt;return e.factorIncrease(t),e}function Et(t=500){const e=new mt;return e.exponentialBackoff(t),e}function St(t){const e=new mt;return e.shuttleInterval(t),e}function Ot(t){const e=new mt;return e.timeout(t),e}function Rt(t){const e=new mt;return e.taskTimeout(t),e}function $t(t){const e=new mt;return e.task(t),e.start()}var Tt={name:ft,infinite:wt,times:pt,maxRetries:dt,min:gt,max:vt,range:yt,fixedInterval:xt,fixedBackoff:kt,fixedIncrease:Lt,linearBackoff:bt,factorIncrease:Nt,exponentialBackoff:Et,shuttleInterval:St,timeout:Ot,taskTimeout:Rt,start:$t};t(mt,Tt);var Ft={Policy:d,Retrier:mt,Event:J,RetrierFactory:Tt,...Tt};export{J as Event,d as Policy,mt as Retrier,Tt as RetrierFactory,Ft as default,Et as exponentialBackoff,Nt as factorIncrease,kt as fixedBackoff,Lt as fixedIncrease,xt as fixedInterval,wt as infinite,bt as linearBackoff,vt as max,dt as maxRetries,gt as min,ft as name,yt as range,St as shuttleInterval,$t as start,Rt as taskTimeout,Ot as timeout,pt as times};
//# sourceMappingURL=index-min.js.map