aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue/handlers/manage-video-torrent.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-05-05 13:41:48 +0200
committerChocobozzz <chocobozzz@cpy.re>2023-05-09 08:57:34 +0200
commita687879e94fa5d3ecdd76bec3d94d0e1698ee913 (patch)
treeb17ee096918dfd4624d50dbf0e91ff8f66bd4a7f /server/lib/job-queue/handlers/manage-video-torrent.ts
parente7d8e2b245491c0a8e008fb570037506d729ff04 (diff)
downloadPeerTube-a687879e94fa5d3ecdd76bec3d94d0e1698ee913.tar.gz
PeerTube-a687879e94fa5d3ecdd76bec3d94d0e1698ee913.tar.zst
PeerTube-a687879e94fa5d3ecdd76bec3d94d0e1698ee913.zip
Reload the video after waiting for the files lock
Diffstat (limited to 'server/lib/job-queue/handlers/manage-video-torrent.ts')
-rw-r--r--server/lib/job-queue/handlers/manage-video-torrent.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/lib/job-queue/handlers/manage-video-torrent.ts b/server/lib/job-queue/handlers/manage-video-torrent.ts
index cef93afda..edf52de0c 100644
--- a/server/lib/job-queue/handlers/manage-video-torrent.ts
+++ b/server/lib/job-queue/handlers/manage-video-torrent.ts
@@ -35,6 +35,9 @@ async function doCreateAction (payload: ManageVideoTorrentPayload & { action: 'c
35 const fileMutexReleaser = await VideoPathManager.Instance.lockFiles(video.uuid) 35 const fileMutexReleaser = await VideoPathManager.Instance.lockFiles(video.uuid)
36 36
37 try { 37 try {
38 await video.reload()
39 await file.reload()
40
38 await createTorrentAndSetInfoHash(video, file) 41 await createTorrentAndSetInfoHash(video, file)
39 42
40 // Refresh videoFile because the createTorrentAndSetInfoHash could be long 43 // Refresh videoFile because the createTorrentAndSetInfoHash could be long