server: skip instances that proclaimed themself dead via HTTP 410

Changelog: Fixed
This commit is contained in:
Johann150 2022-11-10 00:23:30 +01:00
parent ca90cedba0
commit 5b61941e4c
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -33,7 +33,8 @@ export async function skippedInstances(hosts: Array<Instace['host']>): Array<Ins
})
.andWhere(new Brackets(qb => { qb
.where('instance.isSuspended')
.orWhere('instance.lastCommunicatedAt < :deadTime', { deadTime });
.orWhere('instance.lastCommunicatedAt < :deadTime', { deadTime })
.orWhere('instance.latestStatus = 410');
}))
.select('host')
.getRawMany()