1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 02:09:37 +02:00

Fix import video file lock

This commit is contained in:
Chocobozzz 2023-05-02 13:38:00 +02:00 committed by Chocobozzz
parent 94bb740b49
commit 9a3db678f5
7 changed files with 19 additions and 9 deletions

View file

@ -26,10 +26,13 @@ export class TranscodingRunnerJobBuilder extends AbstractJobBuilder {
videoFile: MVideoFile
isNewVideo: boolean
user: MUserId
videoFileAlreadyLocked: boolean
}) {
const { video, videoFile, isNewVideo, user } = options
const { video, videoFile, isNewVideo, user, videoFileAlreadyLocked } = options
const mutexReleaser = await VideoPathManager.Instance.lockFiles(video.uuid)
const mutexReleaser = videoFileAlreadyLocked
? () => {}
: await VideoPathManager.Instance.lockFiles(video.uuid)
try {
await VideoPathManager.Instance.makeAvailableVideoFile(videoFile.withVideoOrPlaylist(video), async videoFilePath => {