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:
parent
0d28b07203
commit
7ed43b76b5
1 changed files with 4 additions and 1 deletions
|
@ -40,7 +40,10 @@ export async function skippedInstances(
|
||||||
.andWhere(
|
.andWhere(
|
||||||
new Brackets((qb) => {
|
new Brackets((qb) => {
|
||||||
qb.where("instance.isSuspended")
|
qb.where("instance.isSuspended")
|
||||||
.orWhere("instance.lastCommunicatedAt < :deadTime", { deadTime });
|
.orWhere(new Brackets((qb) => {
|
||||||
|
qb.where("instance.isNotResponding")
|
||||||
|
.andWhere("instance.lastCommunicatedAt < :deadTime", { deadTime });
|
||||||
|
}));
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.select("host")
|
.select("host")
|
||||||
|
|
Loading…
Reference in a new issue