[backend/queue] Check for correct heartbeat interval

This commit is contained in:
Laura Hausmann 2024-03-26 17:23:37 +01:00
parent a4ae25d5f3
commit c235f1a586
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -246,7 +246,7 @@ public class PostgresJobQueue<T>(
p.WorkerId != null &&
!db.Workers.Any(w => w.Id == p.WorkerId &&
w.Heartbeat >
DateTime.UtcNow - TimeSpan.FromSeconds(60)))),
DateTime.UtcNow - TimeSpan.FromSeconds(45)))),
token);
var actualParallelism = Math.Min(parallelism - runningCount, queuedCount);