diff options
Diffstat (limited to 'scripts/create-transcoding-job.ts')
-rwxr-xr-x | scripts/create-transcoding-job.ts | 6 |
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 | ||
4 | import * as program from 'commander' | 4 | import * as program from 'commander' |
5 | import { VideoModel } from '../server/models/video/video' | 5 | import { VideoModel } from '../server/models/video/video' |
6 | import { initDatabaseModels } from '../server/initializers' | 6 | import { initDatabaseModels } from '../server/initializers/database' |
7 | import { JobQueue } from '../server/lib/job-queue' | 7 | import { JobQueue } from '../server/lib/job-queue' |
8 | import { VideoTranscodingPayload } from '../server/lib/job-queue/handlers/video-transcoding' | ||
9 | import { computeResolutionsToTranscode } from '@server/helpers/ffmpeg-utils' | 8 | import { computeResolutionsToTranscode } from '@server/helpers/ffmpeg-utils' |
9 | import { VideoTranscodingPayload } from '@shared/models' | ||
10 | 10 | ||
11 | program | 11 | program |
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 | } |