Make sure unresponsive split domain instances that come back to life don't get stuck isNotResponding

This commit is contained in:
Laura Hausmann 2024-01-30 18:27:06 +01:00
parent 7ed43b76b5
commit a1460503cf
No known key found for this signature in database
GPG Key ID: D044E84C5BE01605

View File

@ -194,6 +194,27 @@ export default async (job: Bull.Job<InboxJobData>): Promise<string> => {
federationChart.inbox(i.host);
});
const inbox = authUser.user.sharedInbox ?? authUser.user.inbox;
if (inbox !== null) {
const { host: inboxHost } = new URL(inbox);
if (inboxHost !== authUser.user.host) {
registerOrFetchInstanceDoc(inboxHost).then((i) => {
Instances.update(i.id, {
latestRequestReceivedAt: new Date(),
lastCommunicatedAt: new Date(),
isNotResponding: false,
});
fetchInstanceMetadata(i);
instanceChart.requestReceived(i.host);
apRequestChart.inbox();
federationChart.inbox(i.host);
});
}
}
// アクティビティを処理
await perform(authUser.user, activity);
return "ok";