From 71d4af1efc810f853e1a0d986bf758c201692594 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 11 Jun 2021 14:09:33 +0200 Subject: Use raw SQL for most of video queries --- scripts/create-import-video-file-job.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/create-import-video-file-job.ts') diff --git a/scripts/create-import-video-file-job.ts b/scripts/create-import-video-file-job.ts index 5d38af066..094544e05 100644 --- a/scripts/create-import-video-file-job.ts +++ b/scripts/create-import-video-file-job.ts @@ -36,7 +36,7 @@ async function run () { return } - const video = await VideoModel.loadByUUID(options.video) + const video = await VideoModel.load(options.video) if (!video) throw new Error('Video not found.') if (video.isOwned() === false) throw new Error('Cannot import files of a non owned video.') @@ -45,7 +45,7 @@ async function run () { filePath: resolve(options.import) } - await JobQueue.Instance.init() + JobQueue.Instance.init() await JobQueue.Instance.createJobWithPromise({ type: 'video-file-import', payload: dataInput }) console.log('Import job for video %s created.', video.uuid) } -- cgit v1.2.3