From 1f7ab4f3104df051f2d2cd4ed85ff6092c92efeb Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 24 Jan 2018 10:25:56 +0100 Subject: Upgrade server dependencies --- server/lib/activitypub/process/process-create.ts | 2 +- server/lib/activitypub/process/process-update.ts | 3 ++- server/lib/activitypub/videos.ts | 2 +- .../lib/jobs/transcoding-job-scheduler/video-file-optimizer-handler.ts | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) (limited to 'server') 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 ( async function createRates (actorUrls: string[], video: VideoModel, rate: VideoRateType) { let rateCounts = 0 - const tasks: Bluebird[] = [] + const tasks: Bluebird[] = [] for (const actorUrl of actorUrls) { 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' import { ActivityUpdate } from '../../../../shared/models/activitypub' import { ActivityPubActor } from '../../../../shared/models/activitypub/activitypub-actor' import { VideoTorrentObject } from '../../../../shared/models/activitypub/objects' +import { VideoFile } from '../../../../shared/models/videos' import { retryTransactionWrapper } from '../../../helpers/database-utils' import { logger } from '../../../helpers/logger' import { resetSequelizeInstance } from '../../../helpers/utils' @@ -90,7 +91,7 @@ async function updateRemoteVideo (actor: ActorModel, activity: ActivityUpdate) { await Promise.all(videoFileDestroyTasks) const videoFileAttributes = videoFileActivityUrlToDBAttributes(videoInstance, videoAttributesToUpdate) - const tasks: Bluebird[] = videoFileAttributes.map(f => VideoFileModel.create(f)) + const tasks = videoFileAttributes.map(f => VideoFileModel.create(f)) await Promise.all(tasks) 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: throw new Error('Cannot find valid files for video %s ' + videoObject.url) } - const tasks: Bluebird[] = videoFileAttributes.map(f => VideoFileModel.create(f, { transaction: t })) + const tasks = videoFileAttributes.map(f => VideoFileModel.create(f, { transaction: t })) await Promise.all(tasks) 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' import { logger } from '../../../helpers/logger' import { computeResolutionsToTranscode } from '../../../helpers/utils' import { sequelizeTypescript } from '../../../initializers' +import { JobModel } from '../../../models/job/job' import { VideoModel } from '../../../models/video/video' import { shareVideoByServerAndChannel } from '../../activitypub' import { sendCreateVideo } from '../../activitypub/send' @@ -55,7 +56,7 @@ async function onSuccess (jobId: number, video: VideoModel, jobScheduler: JobSch if (resolutionsEnabled.length !== 0) { try { await sequelizeTypescript.transaction(async t => { - const tasks: Bluebird[] = [] + const tasks: Bluebird[] = [] for (const resolution of resolutionsEnabled) { const dataInput = { -- cgit v1.2.3