nicoorfi/insist

在 eventsauce/backoff 的基础上封装的方法,用于重试可能失败的调用。

1.0.1 2022-03-08 08:28 UTC

This package is auto-updated.

Last update: 2024-09-08 13:51:01 UTC


README

在 eventsauce/backoff 的基础上封装的方法,用于重试可能失败的调用。

安装

通过 Composer

$ composer require nicoorfi/insist

使用方法

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
);

变更日志

有关最近更改的更多信息,请参阅 变更日志

许可证

MIT 许可证 (MIT)。有关更多信息,请参阅 许可证文件