From 95e1b80f41cfd4bd8b5a471144fa38fbfa34dc0e Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sat, 16 Mar 2019 09:55:19 +0900 Subject: [PATCH] =?UTF-8?q?updatePerson=E3=82=92=E8=A9=A6=E8=A1=8C?= =?UTF-8?q?=E3=81=97=E3=81=9F=E6=99=82=E7=82=B9=E3=81=A7=E3=82=82lastFetch?= =?UTF-8?q?edAt=E3=82=92=E6=9B=B4=E6=96=B0=E3=81=99=E3=82=8B=20(#4510)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/remote/activitypub/models/person.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/remote/activitypub/models/person.ts b/src/remote/activitypub/models/person.ts index c2b99dfb0..d27c93798 100644 --- a/src/remote/activitypub/models/person.ts +++ b/src/remote/activitypub/models/person.ts @@ -294,6 +294,13 @@ export async function updatePerson(uri: string, resolver?: Resolver, hint?: obje } //#endregion + // 繋がらないインスタンスに何回も試行するのを防ぐ, 後続の同様処理の連続試行を防ぐ ため 試行前にも更新する + await User.update({ _id: exist._id }, { + $set: { + lastFetchedAt: new Date(), + }, + }); + if (resolver == null) resolver = new Resolver(); const object = hint || await resolver.resolve(uri) as any;