Improve dead instances pruning

This fixes a couple edge cases in which inactive but working instances could be caught by the dead instances filter
This commit is contained in:
Laura Hausmann 2024-01-30 18:00:54 +01:00
parent 0d28b07203
commit 7ed43b76b5
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -40,7 +40,10 @@ export async function skippedInstances(
.andWhere(
new Brackets((qb) => {
qb.where("instance.isSuspended")
.orWhere("instance.lastCommunicatedAt < :deadTime", { deadTime });
.orWhere(new Brackets((qb) => {
qb.where("instance.isNotResponding")
.andWhere("instance.lastCommunicatedAt < :deadTime", { deadTime });
}));
}),
)
.select("host")