diff options
author | Chocobozzz <me@florianbigard.com> | 2021-03-10 09:39:17 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-03-24 18:18:40 +0100 |
commit | 266131e0ca2f2622bbb15299212f00b1efa36867 (patch) | |
tree | b887a574bb698076282921385e862f34f0f541da /server/lib/activitypub | |
parent | e5abb482c303e192c8eba15ff35bcad790c876bf (diff) | |
download | PeerTube-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.ts | 8 |
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 = { | |||
18 | type ResolveThreadResult = Promise<{ video: MVideoAccountLightBlacklistAllFiles, comment: MCommentOwnerVideo, commentCreated: boolean }> | 18 | type ResolveThreadResult = Promise<{ video: MVideoAccountLightBlacklistAllFiles, comment: MCommentOwnerVideo, commentCreated: boolean }> |
19 | 19 | ||
20 | async function addVideoComments (commentUrls: string[]) { | 20 | async 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 | ||