aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-03-10 09:39:17 +0100
committerChocobozzz <me@florianbigard.com>2021-03-24 18:18:40 +0100
commit266131e0ca2f2622bbb15299212f00b1efa36867 (patch)
treeb887a574bb698076282921385e862f34f0f541da /server/lib/activitypub
parente5abb482c303e192c8eba15ff35bcad790c876bf (diff)
downloadPeerTube-266131e0ca2f2622bbb15299212f00b1efa36867.tar.gz
PeerTube-266131e0ca2f2622bbb15299212f00b1efa36867.tar.zst
PeerTube-266131e0ca2f2622bbb15299212f00b1efa36867.zip
Don't skip all threads on AP fetcher error
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r--server/lib/activitypub/video-comments.ts8
1 files 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 = {
18type ResolveThreadResult = Promise<{ video: MVideoAccountLightBlacklistAllFiles, comment: MCommentOwnerVideo, commentCreated: boolean }> 18type ResolveThreadResult = Promise<{ video: MVideoAccountLightBlacklistAllFiles, comment: MCommentOwnerVideo, commentCreated: boolean }>
19 19
20async function addVideoComments (commentUrls: string[]) { 20async function addVideoComments (commentUrls: string[]) {
21 return Bluebird.map(commentUrls, commentUrl => { 21 return Bluebird.map(commentUrls, async commentUrl => {
22 return resolveThread({ url: commentUrl, isVideo: false }) 22 try {
23 await resolveThread({ url: commentUrl, isVideo: false })
24 } catch (err) {
25 logger.warn('Cannot resolve thread %s.', commentUrl, { err })
26 }
23 }, { concurrency: CRAWL_REQUEST_CONCURRENCY }) 27 }, { concurrency: CRAWL_REQUEST_CONCURRENCY })
24} 28}
25 29