Don't skip all threads on AP fetcher error
This commit is contained in:
parent
e5abb482c3
commit
266131e0ca
1 changed files with 6 additions and 2 deletions
|
@ -18,8 +18,12 @@ type ResolveThreadParams = {
|
||||||
type ResolveThreadResult = Promise<{ video: MVideoAccountLightBlacklistAllFiles, comment: MCommentOwnerVideo, commentCreated: boolean }>
|
type ResolveThreadResult = Promise<{ video: MVideoAccountLightBlacklistAllFiles, comment: MCommentOwnerVideo, commentCreated: boolean }>
|
||||||
|
|
||||||
async function addVideoComments (commentUrls: string[]) {
|
async function addVideoComments (commentUrls: string[]) {
|
||||||
return Bluebird.map(commentUrls, commentUrl => {
|
return Bluebird.map(commentUrls, async commentUrl => {
|
||||||
return resolveThread({ url: commentUrl, isVideo: false })
|
try {
|
||||||
|
await resolveThread({ url: commentUrl, isVideo: false })
|
||||||
|
} catch (err) {
|
||||||
|
logger.warn('Cannot resolve thread %s.', commentUrl, { err })
|
||||||
|
}
|
||||||
}, { concurrency: CRAWL_REQUEST_CONCURRENCY })
|
}, { concurrency: CRAWL_REQUEST_CONCURRENCY })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue