edouardcourty/retryable-command
最新稳定版本:1.0.0
Composer 安装命令:
composer require edouardcourty/retryable-command
包简介
Retry commands if they fail, based on Symfony Commands
README 文档
README
This library adds a retry feature to Symfony Commands.
Usage
To make a command retryable, make it extend RetryableCommand\Command\RetryableCommand.
To configure how many retries the command will do, you can either:
- Use the
setMaxRetrycommand inside theconfiguremethod - Use the
max-retryCLI option when calling the command
The sleep timeout is calculated using the retryTimeout that has to be implemented.
If you don't want to wait between retries, simply return 0.
This method accepts the current retry as a parameter, making it possible to compute dynamic retry timeouts depending on how many retries have been done already.
Contributing
If you wish to contribute to this project, feel free to submit a PR explaining your changes, and make sure to test your addition.
The pipeline has to be passing.
© - Edouard Courty
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: ISC
- 更新时间: 2023-11-03