Nupital Pomp Mesmerises

    @fabrix/spool-retry
    TypeScript icon, indicating that this package has built-in type declarations

    1.6.2 • Public • Published

    spool-retry

    Gitter NPM version Build Status Test Coverage Dependency Status Follow @FabrixApp on Twitter

    📦 retry Spool

    A Spool to make it easy to use Retries with Fabrix

    Install

    $ npm install --save @fabrix/spool-retry

    Configure

    // config/main.ts
    import { RetrySpool } from '@fabrix/spool-retry'
    export const main = {
      spools: [
        // ... other spools
        RetrySpool
      ]
    }

    Configuration

    // config/retry.ts
    export const retry = {
      // retries: The maximum amount of times to retry the operation. Default is 10.
      retries: null, // 10,
      // factor: The exponential factor to use. Default is 2.
      factor: null, // 2,
      // minTimeout: The number of milliseconds before starting the first retry. Default is 1000.
      minTimeout: null, // 1000,
      // maxTimeout: The maximum number of milliseconds between two retries. Default is Infinity.
      maxTimeout: null,
      // randomize: Randomizes the timeouts by multiplying with a factor between 1 to 2. Default is false.
      randomize: false
    }
    

    For more information about store (type and configuration) please see the retry documentation.

    Usage

    For the best results, create a Board Class and override the default methods.

      import { RetryManager } from '@fabrix/spool-retry'
      
      export class Retry extends RetryManager {
    
      }
     this.app.retries.MyRetry.attemtp(func, params)

    Install

    npm i @fabrix/spool-retry

    Homepage

    fabrix.app

    DownloadsWeekly Downloads

    4

    Version

    1.6.2

    License

    MIT

    Unpacked Size

    34.1 kB

    Total Files

    46

    Last publish

    Collaborators

    • scottbwyatt