diff options
| author | MeiMei <30769358+mei23@users.noreply.github.com> | 2019-03-16 09:55:19 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2019-03-16 09:55:19 +0900 |
| commit | 95e1b80f41cfd4bd8b5a471144fa38fbfa34dc0e (patch) | |
| tree | 604ecc4725e717e12efe509c034c5bf5e8b6136a /src/remote | |
| parent | Resolve #1727 (#4512) (diff) | |
| download | sharkey-95e1b80f41cfd4bd8b5a471144fa38fbfa34dc0e.tar.gz sharkey-95e1b80f41cfd4bd8b5a471144fa38fbfa34dc0e.tar.bz2 sharkey-95e1b80f41cfd4bd8b5a471144fa38fbfa34dc0e.zip | |
updatePersonを試行した時点でもlastFetchedAtを更新する (#4510)
Diffstat (limited to 'src/remote')
| -rw-r--r-- | src/remote/activitypub/models/person.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/remote/activitypub/models/person.ts b/src/remote/activitypub/models/person.ts index c2b99dfb04..d27c937988 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; |