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:
parent
94bb740b49
commit
9a3db678f5
7 changed files with 19 additions and 9 deletions
|
@ -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 => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue