[backend/queue] Don't reset RetryCount for manually retried jobs

This commit is contained in:
Laura Hausmann 2024-06-23 13:30:31 +02:00
parent 8606df89c0
commit e971a781e6
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -244,7 +244,7 @@ public class QueueService(
var cnt = await db.Jobs.Where(p => p.Id == job.Id && p.Status == Job.JobStatus.Failed) var cnt = await db.Jobs.Where(p => p.Id == job.Id && p.Status == Job.JobStatus.Failed)
.ExecuteUpdateAsync(p => p.SetProperty(i => i.Status, _ => Job.JobStatus.Queued) .ExecuteUpdateAsync(p => p.SetProperty(i => i.Status, _ => Job.JobStatus.Queued)
.SetProperty(i => i.QueuedAt, _ => DateTime.UtcNow) .SetProperty(i => i.QueuedAt, _ => DateTime.UtcNow)
.SetProperty(i => i.RetryCount, _ => 0) .SetProperty(i => i.RetryCount, i => i.RetryCount + 1)
.SetProperty(i => i.WorkerId, _ => null) .SetProperty(i => i.WorkerId, _ => null)
.SetProperty(i => i.DelayedUntil, _ => null) .SetProperty(i => i.DelayedUntil, _ => null)
.SetProperty(i => i.StartedAt, _ => null) .SetProperty(i => i.StartedAt, _ => null)