[backend/queue] Improve inbox queue retry mechanism (ISH-503)
This retries jobs for a cumulative maximum of 24 hours.
This commit is contained in:
parent
9f39895142
commit
36f277e0d3
1 changed files with 2 additions and 2 deletions
|
@ -41,11 +41,11 @@ public class InboxQueue(int parallelism)
|
|||
}
|
||||
catch (Exception e) when (e is not GracefulException)
|
||||
{
|
||||
if (job.RetryCount++ < 4)
|
||||
if (job.RetryCount++ < 10)
|
||||
{
|
||||
var jitter = TimeSpan.FromSeconds(new Random().Next(0, 60));
|
||||
var baseDelay = TimeSpan.FromMinutes(1);
|
||||
var maxBackoff = TimeSpan.FromHours(8);
|
||||
var maxBackoff = TimeSpan.FromHours(7);
|
||||
var backoff = (Math.Pow(2, job.RetryCount) - 1) * baseDelay;
|
||||
if (backoff > maxBackoff)
|
||||
backoff = maxBackoff;
|
||||
|
|
Loading…
Add table
Reference in a new issue