aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/job-queue/handlers')
-rw-r--r--server/lib/job-queue/handlers/activitypub-follow.ts4
-rw-r--r--server/lib/job-queue/handlers/video-import.ts5
-rw-r--r--server/lib/job-queue/handlers/video-transcoding.ts3
3 files changed, 7 insertions, 5 deletions
diff --git a/server/lib/job-queue/handlers/activitypub-follow.ts b/server/lib/job-queue/handlers/activitypub-follow.ts
index e7e5ff950..7c84aa937 100644
--- a/server/lib/job-queue/handlers/activitypub-follow.ts
+++ b/server/lib/job-queue/handlers/activitypub-follow.ts
@@ -1,6 +1,6 @@
1import * as Bull from 'bull' 1import * as Bull from 'bull'
2import { logger } from '../../../helpers/logger' 2import { logger } from '../../../helpers/logger'
3import { CONFIG, REMOTE_SCHEME, sequelizeTypescript } from '../../../initializers' 3import { REMOTE_SCHEME, sequelizeTypescript, WEBSERVER } from '../../../initializers'
4import { sendFollow } from '../../activitypub/send' 4import { sendFollow } from '../../activitypub/send'
5import { sanitizeHost } from '../../../helpers/core-utils' 5import { sanitizeHost } from '../../../helpers/core-utils'
6import { loadActorUrlOrGetFromWebfinger } from '../../../helpers/webfinger' 6import { loadActorUrlOrGetFromWebfinger } from '../../../helpers/webfinger'
@@ -23,7 +23,7 @@ async function processActivityPubFollow (job: Bull.Job) {
23 logger.info('Processing ActivityPub follow in job %d.', job.id) 23 logger.info('Processing ActivityPub follow in job %d.', job.id)
24 24
25 let targetActor: ActorModel 25 let targetActor: ActorModel
26 if (!host || host === CONFIG.WEBSERVER.HOST) { 26 if (!host || host === WEBSERVER.HOST) {
27 targetActor = await ActorModel.loadLocalByName(payload.name) 27 targetActor = await ActorModel.loadLocalByName(payload.name)
28 } else { 28 } else {
29 const sanitizedHost = sanitizeHost(host, REMOTE_SCHEME.HTTP) 29 const sanitizedHost = sanitizeHost(host, REMOTE_SCHEME.HTTP)
diff --git a/server/lib/job-queue/handlers/video-import.ts b/server/lib/job-queue/handlers/video-import.ts
index c5fc1061c..732773efd 100644
--- a/server/lib/job-queue/handlers/video-import.ts
+++ b/server/lib/job-queue/handlers/video-import.ts
@@ -6,7 +6,7 @@ import { VideoImportState } from '../../../../shared/models/videos'
6import { getDurationFromVideoFile, getVideoFileFPS, getVideoFileResolution } from '../../../helpers/ffmpeg-utils' 6import { getDurationFromVideoFile, getVideoFileFPS, getVideoFileResolution } from '../../../helpers/ffmpeg-utils'
7import { extname, join } from 'path' 7import { extname, join } from 'path'
8import { VideoFileModel } from '../../../models/video/video-file' 8import { VideoFileModel } from '../../../models/video/video-file'
9import { CONFIG, PREVIEWS_SIZE, sequelizeTypescript, THUMBNAILS_SIZE, VIDEO_IMPORT_TIMEOUT } from '../../../initializers' 9import { PREVIEWS_SIZE, sequelizeTypescript, THUMBNAILS_SIZE, VIDEO_IMPORT_TIMEOUT } from '../../../initializers'
10import { downloadImage } from '../../../helpers/requests' 10import { downloadImage } from '../../../helpers/requests'
11import { VideoState } from '../../../../shared' 11import { VideoState } from '../../../../shared'
12import { JobQueue } from '../index' 12import { JobQueue } from '../index'
@@ -14,8 +14,9 @@ import { federateVideoIfNeeded } from '../../activitypub'
14import { VideoModel } from '../../../models/video/video' 14import { VideoModel } from '../../../models/video/video'
15import { downloadWebTorrentVideo } from '../../../helpers/webtorrent' 15import { downloadWebTorrentVideo } from '../../../helpers/webtorrent'
16import { getSecureTorrentName } from '../../../helpers/utils' 16import { getSecureTorrentName } from '../../../helpers/utils'
17import { remove, move, stat } from 'fs-extra' 17import { move, remove, stat } from 'fs-extra'
18import { Notifier } from '../../notifier' 18import { Notifier } from '../../notifier'
19import { CONFIG } from '../../../initializers/config'
19 20
20type VideoImportYoutubeDLPayload = { 21type VideoImportYoutubeDLPayload = {
21 type: 'youtube-dl' 22 type: 'youtube-dl'
diff --git a/server/lib/job-queue/handlers/video-transcoding.ts b/server/lib/job-queue/handlers/video-transcoding.ts
index 581ec283e..48cac517e 100644
--- a/server/lib/job-queue/handlers/video-transcoding.ts
+++ b/server/lib/job-queue/handlers/video-transcoding.ts
@@ -5,11 +5,12 @@ import { VideoModel } from '../../../models/video/video'
5import { JobQueue } from '../job-queue' 5import { JobQueue } from '../job-queue'
6import { federateVideoIfNeeded } from '../../activitypub' 6import { federateVideoIfNeeded } from '../../activitypub'
7import { retryTransactionWrapper } from '../../../helpers/database-utils' 7import { retryTransactionWrapper } from '../../../helpers/database-utils'
8import { CONFIG, sequelizeTypescript } from '../../../initializers' 8import { sequelizeTypescript } from '../../../initializers'
9import * as Bluebird from 'bluebird' 9import * as Bluebird from 'bluebird'
10import { computeResolutionsToTranscode } from '../../../helpers/ffmpeg-utils' 10import { computeResolutionsToTranscode } from '../../../helpers/ffmpeg-utils'
11import { generateHlsPlaylist, optimizeVideofile, transcodeOriginalVideofile } from '../../video-transcoding' 11import { generateHlsPlaylist, optimizeVideofile, transcodeOriginalVideofile } from '../../video-transcoding'
12import { Notifier } from '../../notifier' 12import { Notifier } from '../../notifier'
13import { CONFIG } from '../../../initializers/config'
13 14
14export type VideoTranscodingPayload = { 15export type VideoTranscodingPayload = {
15 videoUUID: string 16 videoUUID: string