aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/videos/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-08-09 09:09:31 +0200
committerChocobozzz <me@florianbigard.com>2022-08-09 09:32:17 +0200
commitb42c2c7e89a64ed730d8140840fe74a13c31f2a4 (patch)
tree715e7ad31d03881e3f3530dba1fe3d172251249b /server/lib/activitypub/videos/shared
parentbd911b54b555b11df7e9849cf92d358bccfecf6e (diff)
downloadPeerTube-b42c2c7e89a64ed730d8140840fe74a13c31f2a4.tar.gz
PeerTube-b42c2c7e89a64ed730d8140840fe74a13c31f2a4.tar.zst
PeerTube-b42c2c7e89a64ed730d8140840fe74a13c31f2a4.zip
Avoid concurrency issue on transcoding
Diffstat (limited to 'server/lib/activitypub/videos/shared')
-rw-r--r--server/lib/activitypub/videos/shared/video-sync-attributes.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/lib/activitypub/videos/shared/video-sync-attributes.ts b/server/lib/activitypub/videos/shared/video-sync-attributes.ts
index 8ed1b6447..e3cb96a62 100644
--- a/server/lib/activitypub/videos/shared/video-sync-attributes.ts
+++ b/server/lib/activitypub/videos/shared/video-sync-attributes.ts
@@ -73,10 +73,6 @@ async function getRatesCount (type: 'like' | 'dislike', video: MVideo, fetchedVi
73 return totalItems 73 return totalItems
74} 74}
75 75
76function createJob (payload: ActivitypubHttpFetcherPayload) {
77 return JobQueue.Instance.createJob({ type: 'activitypub-http-fetcher', payload })
78}
79
80function syncShares (video: MVideo, fetchedVideo: VideoObject, isSync: boolean) { 76function syncShares (video: MVideo, fetchedVideo: VideoObject, isSync: boolean) {
81 const uri = fetchedVideo.shares 77 const uri = fetchedVideo.shares
82 78
@@ -104,3 +100,7 @@ function syncComments (video: MVideo, fetchedVideo: VideoObject, isSync: boolean
104 return crawlCollectionPage<string>(uri, handler, cleaner) 100 return crawlCollectionPage<string>(uri, handler, cleaner)
105 .catch(err => logger.error('Cannot add comments of video %s.', video.uuid, { err, rootUrl: uri, ...lTags(video.uuid, video.url) })) 101 .catch(err => logger.error('Cannot add comments of video %s.', video.uuid, { err, rootUrl: uri, ...lTags(video.uuid, video.url) }))
106} 102}
103
104function createJob (payload: ActivitypubHttpFetcherPayload) {
105 return JobQueue.Instance.createJob({ type: 'activitypub-http-fetcher', payload })
106}