nicoorfi/insist

Method wrappers around eventsauce/backoff, that retries callables actions thay may fail.

1.0.1 2022-03-08 08:28 UTC

This package is auto-updated.

Last update: 2024-12-08 14:22:19 UTC


README

Method wrappers around eventsauce/backoff, that retries callables actions thay may fail.

Install

Via Composer

$ composer require nicoorfi/insist

Usage

insist_fibonnaci($actionThatMayFail,
    100000, // initial delay in microseconds, 0.1 seconds
    15, // max number of tries
    2500000, // (optional) max delay in microseconds, default 2.5 seconds
);

insist_linear($actionThatMayFail,
    100000, // initial delay in microseconds, 0.1 seconds
    15, // max number of tries
    2500000, // (optional) max delay in microseconds, default 2.5 seconds
);

Change log

Please see CHANGELOG for more information on what has changed recently.

License

The MIT License (MIT). Please see License File for more information.