mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-11-21 16:27:50 -06:00
Relax federation logs
This commit is contained in:
parent
90275e5e03
commit
766f2cb76a
@ -9,6 +9,7 @@ import { fetchAP, getAPId } from './activity.js'
|
||||
import { getOrCreateAPActor } from './actors/index.js'
|
||||
import { sendUndoAnnounce, sendVideoAnnounce } from './send/index.js'
|
||||
import { checkUrlsSameHost, getLocalVideoAnnounceActivityPubUrl } from './url.js'
|
||||
import { HttpStatusCode } from '@peertube/peertube-models'
|
||||
|
||||
const lTags = loggerTagsFactory('share')
|
||||
|
||||
@ -32,7 +33,12 @@ export async function addVideoShares (shareUrls: string[], video: MVideoId) {
|
||||
try {
|
||||
await addVideoShare(shareUrl, video)
|
||||
} catch (err) {
|
||||
logger.warn('Cannot add share %s.', shareUrl, { err })
|
||||
if (err.statusCode === HttpStatusCode.NOT_FOUND_404 || err.statusCode === HttpStatusCode.GONE_410) {
|
||||
logger.debug(`Cannot add share ${shareUrl} that does not exist anymore`, { err })
|
||||
return
|
||||
}
|
||||
|
||||
logger.info(`Cannot add share ${shareUrl}`, { err })
|
||||
}
|
||||
}, { concurrency: CRAWL_REQUEST_CONCURRENCY })
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { VideoCommentPolicy } from '@peertube/peertube-models'
|
||||
import { HttpStatusCode, VideoCommentPolicy } from '@peertube/peertube-models'
|
||||
import Bluebird from 'bluebird'
|
||||
import { sanitizeAndCheckVideoCommentObject } from '../../helpers/custom-validators/activitypub/video-comments.js'
|
||||
import { logger } from '../../helpers/logger.js'
|
||||
@ -34,7 +34,12 @@ export async function addVideoComments (commentUrls: string[]) {
|
||||
try {
|
||||
await resolveThread({ url: commentUrl, isVideo: false })
|
||||
} catch (err) {
|
||||
logger.warn('Cannot resolve thread %s.', commentUrl, { err })
|
||||
if (err.statusCode === HttpStatusCode.NOT_FOUND_404 || err.statusCode === HttpStatusCode.GONE_410) {
|
||||
logger.debug(`Cannot resolve thread ${commentUrl} that does not exist anymore`, { err })
|
||||
return
|
||||
}
|
||||
|
||||
logger.info(`Cannot resolve thread ${commentUrl}`, { err })
|
||||
}
|
||||
}, { concurrency: CRAWL_REQUEST_CONCURRENCY })
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user