Have ideas to improve npm?Join in the discussion! »

    backoff-manager
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.3 • Public • Published

    Backoff

    Retry inplementing exponential backoff based on error throwing or result containing status > 500.

    Usage:

    import backoff from '@pabagan/backoff';
     
    const opErrorEstatusCode = await backOff(() => randomErrorRest());
    const opFunction = await backOff(() => randomError('message'));
    const opWithConf = await backOff(() => randomErrorRest(), {
      tryUntil: '10min',
      delay: 1000,
      runAt: Date.now()
    });

    Install

    npm i backoff-manager

    DownloadsWeekly Downloads

    0

    Version

    0.0.3

    License

    ISC

    Unpacked Size

    11.4 kB

    Total Files

    9

    Last publish

    Collaborators

    • avatar