yuzd / Hangfire.HttpJob

httpjob for Hangfire,restful api for Hangfire,job调度与业务分离
https://github.com/yuzd/Hangfire.HttpJob/wiki
MIT License
628 stars 185 forks source link

job失败重试 #29

Closed bjornxiong closed 4 years ago

bjornxiong commented 4 years ago

Hi,你好,我学习了下你的代码发现job如果失败重试次数、间隔是不可以配置的,[AutomaticRetrySet(Attempts = 3, DelaysInSeconds = new[] { 20, 30, 60 }, LogEvents = true, OnAttemptsExceeded = AttemptsExceededAction.Delete)] 有时api挂了不一定可以在这个时间段重启好,请问下有什么办法可以修改吗?谢谢你的解答。

yuzd commented 4 years ago

额,这个问题我之前我想到,目前是写死的 主要是这个标签里面的值不可以外部指定,也许可以重写这个AutomaticRetrySet标签 我得试试

bjornxiong commented 4 years ago

好的,谢谢。

yuzd commented 4 years ago

已经实现了,请升级到最新版 如下图:

image