aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/create-transcoding-job.ts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/create-transcoding-job.ts')
-rwxr-xr-xscripts/create-transcoding-job.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/create-transcoding-job.ts b/scripts/create-transcoding-job.ts
index 27170299d..7ee0050e3 100755
--- a/scripts/create-transcoding-job.ts
+++ b/scripts/create-transcoding-job.ts
@@ -3,10 +3,10 @@ registerTSPaths()
3 3
4import * as program from 'commander' 4import * as program from 'commander'
5import { VideoModel } from '../server/models/video/video' 5import { VideoModel } from '../server/models/video/video'
6import { initDatabaseModels } from '../server/initializers' 6import { initDatabaseModels } from '../server/initializers/database'
7import { JobQueue } from '../server/lib/job-queue' 7import { JobQueue } from '../server/lib/job-queue'
8import { VideoTranscodingPayload } from '../server/lib/job-queue/handlers/video-transcoding'
9import { computeResolutionsToTranscode } from '@server/helpers/ffmpeg-utils' 8import { computeResolutionsToTranscode } from '@server/helpers/ffmpeg-utils'
9import { VideoTranscodingPayload } from '@shared/models'
10 10
11program 11program
12 .option('-v, --video [videoUUID]', 'Video UUID') 12 .option('-v, --video [videoUUID]', 'Video UUID')
@@ -72,7 +72,7 @@ async function run () {
72 await JobQueue.Instance.init() 72 await JobQueue.Instance.init()
73 73
74 for (const d of dataInput) { 74 for (const d of dataInput) {
75 await JobQueue.Instance.createJob({ type: 'video-transcoding', payload: d }) 75 await JobQueue.Instance.createJobWithPromise({ type: 'video-transcoding', payload: d })
76 console.log('Transcoding job for video %s created.', video.uuid) 76 console.log('Transcoding job for video %s created.', video.uuid)
77 } 77 }
78} 78}