diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-03 16:56:42 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-06-03 16:56:42 +0200 |
commit | 908e6ead78cc0a42545645be1610024d2ae65746 (patch) | |
tree | 08f59393592087c34a26a3f516b88c769232d8f8 /server/lib/activitypub/videos/shared/video-sync-attributes.ts | |
parent | 136d7efde798d3dc0ec0dd18aac674365f7d162e (diff) | |
download | PeerTube-908e6ead78cc0a42545645be1610024d2ae65746.tar.gz PeerTube-908e6ead78cc0a42545645be1610024d2ae65746.tar.zst PeerTube-908e6ead78cc0a42545645be1610024d2ae65746.zip |
Refactor AP video logger tags
Diffstat (limited to 'server/lib/activitypub/videos/shared/video-sync-attributes.ts')
-rw-r--r-- | server/lib/activitypub/videos/shared/video-sync-attributes.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/activitypub/videos/shared/video-sync-attributes.ts b/server/lib/activitypub/videos/shared/video-sync-attributes.ts index 102d40621..c4e101005 100644 --- a/server/lib/activitypub/videos/shared/video-sync-attributes.ts +++ b/server/lib/activitypub/videos/shared/video-sync-attributes.ts | |||
@@ -62,7 +62,7 @@ function syncRates (type: 'like' | 'dislike', video: MVideo, fetchedVideo: Video | |||
62 | const cleaner = crawlStartDate => AccountVideoRateModel.cleanOldRatesOf(video.id, type, crawlStartDate) | 62 | const cleaner = crawlStartDate => AccountVideoRateModel.cleanOldRatesOf(video.id, type, crawlStartDate) |
63 | 63 | ||
64 | return crawlCollectionPage<string>(uri, handler, cleaner) | 64 | return crawlCollectionPage<string>(uri, handler, cleaner) |
65 | .catch(err => logger.error('Cannot add rate of video %s.', video.uuid, { err, rootUrl: uri, ...lTags(video.uuid) })) | 65 | .catch(err => logger.error('Cannot add rate of video %s.', video.uuid, { err, rootUrl: uri, ...lTags(video.uuid, video.url) })) |
66 | } | 66 | } |
67 | 67 | ||
68 | function syncShares (video: MVideo, fetchedVideo: VideoObject, isSync: boolean) { | 68 | function syncShares (video: MVideo, fetchedVideo: VideoObject, isSync: boolean) { |
@@ -76,7 +76,7 @@ function syncShares (video: MVideo, fetchedVideo: VideoObject, isSync: boolean) | |||
76 | const cleaner = crawlStartDate => VideoShareModel.cleanOldSharesOf(video.id, crawlStartDate) | 76 | const cleaner = crawlStartDate => VideoShareModel.cleanOldSharesOf(video.id, crawlStartDate) |
77 | 77 | ||
78 | return crawlCollectionPage<string>(uri, handler, cleaner) | 78 | return crawlCollectionPage<string>(uri, handler, cleaner) |
79 | .catch(err => logger.error('Cannot add shares of video %s.', video.uuid, { err, rootUrl: uri, ...lTags(video.uuid) })) | 79 | .catch(err => logger.error('Cannot add shares of video %s.', video.uuid, { err, rootUrl: uri, ...lTags(video.uuid, video.url) })) |
80 | } | 80 | } |
81 | 81 | ||
82 | function syncComments (video: MVideo, fetchedVideo: VideoObject, isSync: boolean) { | 82 | function syncComments (video: MVideo, fetchedVideo: VideoObject, isSync: boolean) { |
@@ -90,5 +90,5 @@ function syncComments (video: MVideo, fetchedVideo: VideoObject, isSync: boolean | |||
90 | const cleaner = crawlStartDate => VideoCommentModel.cleanOldCommentsOf(video.id, crawlStartDate) | 90 | const cleaner = crawlStartDate => VideoCommentModel.cleanOldCommentsOf(video.id, crawlStartDate) |
91 | 91 | ||
92 | return crawlCollectionPage<string>(uri, handler, cleaner) | 92 | return crawlCollectionPage<string>(uri, handler, cleaner) |
93 | .catch(err => logger.error('Cannot add comments of video %s.', video.uuid, { err, rootUrl: uri, ...lTags(video.uuid) })) | 93 | .catch(err => logger.error('Cannot add comments of video %s.', video.uuid, { err, rootUrl: uri, ...lTags(video.uuid, video.url) })) |
94 | } | 94 | } |