aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/activitypub/process/process-create.ts2
-rw-r--r--server/lib/activitypub/process/process-update.ts3
-rw-r--r--server/lib/activitypub/videos.ts2
-rw-r--r--server/lib/jobs/transcoding-job-scheduler/video-file-optimizer-handler.ts3
4 files changed, 6 insertions, 4 deletions
diff --git a/server/lib/activitypub/process/process-create.ts b/server/lib/activitypub/process/process-create.ts
index 442cd5c0b..eff796c1d 100644
--- a/server/lib/activitypub/process/process-create.ts
+++ b/server/lib/activitypub/process/process-create.ts
@@ -79,7 +79,7 @@ async function processCreateVideo (
79 79
80async function createRates (actorUrls: string[], video: VideoModel, rate: VideoRateType) { 80async function createRates (actorUrls: string[], video: VideoModel, rate: VideoRateType) {
81 let rateCounts = 0 81 let rateCounts = 0
82 const tasks: Bluebird<any>[] = [] 82 const tasks: Bluebird<number>[] = []
83 83
84 for (const actorUrl of actorUrls) { 84 for (const actorUrl of actorUrls) {
85 const actor = await getOrCreateActorAndServerAndModel(actorUrl) 85 const actor = await getOrCreateActorAndServerAndModel(actorUrl)
diff --git a/server/lib/activitypub/process/process-update.ts b/server/lib/activitypub/process/process-update.ts
index 5439a47f2..b5c97e515 100644
--- a/server/lib/activitypub/process/process-update.ts
+++ b/server/lib/activitypub/process/process-update.ts
@@ -2,6 +2,7 @@ import * as Bluebird from 'bluebird'
2import { ActivityUpdate } from '../../../../shared/models/activitypub' 2import { ActivityUpdate } from '../../../../shared/models/activitypub'
3import { ActivityPubActor } from '../../../../shared/models/activitypub/activitypub-actor' 3import { ActivityPubActor } from '../../../../shared/models/activitypub/activitypub-actor'
4import { VideoTorrentObject } from '../../../../shared/models/activitypub/objects' 4import { VideoTorrentObject } from '../../../../shared/models/activitypub/objects'
5import { VideoFile } from '../../../../shared/models/videos'
5import { retryTransactionWrapper } from '../../../helpers/database-utils' 6import { retryTransactionWrapper } from '../../../helpers/database-utils'
6import { logger } from '../../../helpers/logger' 7import { logger } from '../../../helpers/logger'
7import { resetSequelizeInstance } from '../../../helpers/utils' 8import { resetSequelizeInstance } from '../../../helpers/utils'
@@ -90,7 +91,7 @@ async function updateRemoteVideo (actor: ActorModel, activity: ActivityUpdate) {
90 await Promise.all(videoFileDestroyTasks) 91 await Promise.all(videoFileDestroyTasks)
91 92
92 const videoFileAttributes = videoFileActivityUrlToDBAttributes(videoInstance, videoAttributesToUpdate) 93 const videoFileAttributes = videoFileActivityUrlToDBAttributes(videoInstance, videoAttributesToUpdate)
93 const tasks: Bluebird<any>[] = videoFileAttributes.map(f => VideoFileModel.create(f)) 94 const tasks = videoFileAttributes.map(f => VideoFileModel.create(f))
94 await Promise.all(tasks) 95 await Promise.all(tasks)
95 96
96 const tags = videoAttributesToUpdate.tag.map(t => t.name) 97 const tags = videoAttributesToUpdate.tag.map(t => t.name)
diff --git a/server/lib/activitypub/videos.ts b/server/lib/activitypub/videos.ts
index 1d2d46cbc..263c2629c 100644
--- a/server/lib/activitypub/videos.ts
+++ b/server/lib/activitypub/videos.ts
@@ -163,7 +163,7 @@ async function getOrCreateVideo (videoObject: VideoTorrentObject, channelActor:
163 throw new Error('Cannot find valid files for video %s ' + videoObject.url) 163 throw new Error('Cannot find valid files for video %s ' + videoObject.url)
164 } 164 }
165 165
166 const tasks: Bluebird<any>[] = videoFileAttributes.map(f => VideoFileModel.create(f, { transaction: t })) 166 const tasks = videoFileAttributes.map(f => VideoFileModel.create(f, { transaction: t }))
167 await Promise.all(tasks) 167 await Promise.all(tasks)
168 168
169 const tags = videoObject.tag.map(t => t.name) 169 const tags = videoObject.tag.map(t => t.name)
diff --git a/server/lib/jobs/transcoding-job-scheduler/video-file-optimizer-handler.ts b/server/lib/jobs/transcoding-job-scheduler/video-file-optimizer-handler.ts
index 23677e8d5..f224a31b4 100644
--- a/server/lib/jobs/transcoding-job-scheduler/video-file-optimizer-handler.ts
+++ b/server/lib/jobs/transcoding-job-scheduler/video-file-optimizer-handler.ts
@@ -3,6 +3,7 @@ import { VideoPrivacy } from '../../../../shared/models/videos'
3import { logger } from '../../../helpers/logger' 3import { logger } from '../../../helpers/logger'
4import { computeResolutionsToTranscode } from '../../../helpers/utils' 4import { computeResolutionsToTranscode } from '../../../helpers/utils'
5import { sequelizeTypescript } from '../../../initializers' 5import { sequelizeTypescript } from '../../../initializers'
6import { JobModel } from '../../../models/job/job'
6import { VideoModel } from '../../../models/video/video' 7import { VideoModel } from '../../../models/video/video'
7import { shareVideoByServerAndChannel } from '../../activitypub' 8import { shareVideoByServerAndChannel } from '../../activitypub'
8import { sendCreateVideo } from '../../activitypub/send' 9import { sendCreateVideo } from '../../activitypub/send'
@@ -55,7 +56,7 @@ async function onSuccess (jobId: number, video: VideoModel, jobScheduler: JobSch
55 if (resolutionsEnabled.length !== 0) { 56 if (resolutionsEnabled.length !== 0) {
56 try { 57 try {
57 await sequelizeTypescript.transaction(async t => { 58 await sequelizeTypescript.transaction(async t => {
58 const tasks: Bluebird<any>[] = [] 59 const tasks: Bluebird<JobModel>[] = []
59 60
60 for (const resolution of resolutionsEnabled) { 61 for (const resolution of resolutionsEnabled) {
61 const dataInput = { 62 const dataInput = {