From 266131e0ca2f2622bbb15299212f00b1efa36867 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 10 Mar 2021 09:39:17 +0100 Subject: Don't skip all threads on AP fetcher error --- server/lib/activitypub/video-comments.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server/lib/activitypub/video-comments.ts b/server/lib/activitypub/video-comments.ts index f1edfb0ac..e23e0c0e7 100644 --- a/server/lib/activitypub/video-comments.ts +++ b/server/lib/activitypub/video-comments.ts @@ -18,8 +18,12 @@ type ResolveThreadParams = { type ResolveThreadResult = Promise<{ video: MVideoAccountLightBlacklistAllFiles, comment: MCommentOwnerVideo, commentCreated: boolean }> async function addVideoComments (commentUrls: string[]) { - return Bluebird.map(commentUrls, commentUrl => { - return resolveThread({ url: commentUrl, isVideo: false }) + return Bluebird.map(commentUrls, async commentUrl => { + try { + await resolveThread({ url: commentUrl, isVideo: false }) + } catch (err) { + logger.warn('Cannot resolve thread %s.', commentUrl, { err }) + } }, { concurrency: CRAWL_REQUEST_CONCURRENCY }) } -- cgit v1.2.3