diff options
Diffstat (limited to 'server/lib/schedulers')
-rw-r--r-- | server/lib/schedulers/videos-redundancy-scheduler.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/server/lib/schedulers/videos-redundancy-scheduler.ts b/server/lib/schedulers/videos-redundancy-scheduler.ts index 1a48f2bd0..4a8a1d413 100644 --- a/server/lib/schedulers/videos-redundancy-scheduler.ts +++ b/server/lib/schedulers/videos-redundancy-scheduler.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { AbstractScheduler } from './abstract-scheduler' | 1 | import { AbstractScheduler } from './abstract-scheduler' |
2 | import { CONFIG, HLS_REDUNDANCY_DIRECTORY, REDUNDANCY, VIDEO_IMPORT_TIMEOUT } from '../../initializers' | 2 | import { HLS_REDUNDANCY_DIRECTORY, REDUNDANCY, VIDEO_IMPORT_TIMEOUT, WEBSERVER } from '../../initializers' |
3 | import { logger } from '../../helpers/logger' | 3 | import { logger } from '../../helpers/logger' |
4 | import { VideosRedundancy } from '../../../shared/models/redundancy' | 4 | import { VideosRedundancy } from '../../../shared/models/redundancy' |
5 | import { VideoRedundancyModel } from '../../models/redundancy/video-redundancy' | 5 | import { VideoRedundancyModel } from '../../models/redundancy/video-redundancy' |
@@ -15,6 +15,7 @@ import { getOrCreateVideoAndAccountAndChannel } from '../activitypub' | |||
15 | import { VideoStreamingPlaylistModel } from '../../models/video/video-streaming-playlist' | 15 | import { VideoStreamingPlaylistModel } from '../../models/video/video-streaming-playlist' |
16 | import { VideoModel } from '../../models/video/video' | 16 | import { VideoModel } from '../../models/video/video' |
17 | import { downloadPlaylistSegments } from '../hls' | 17 | import { downloadPlaylistSegments } from '../hls' |
18 | import { CONFIG } from '../../initializers/config' | ||
18 | 19 | ||
19 | type CandidateToDuplicate = { | 20 | type CandidateToDuplicate = { |
20 | redundancy: VideosRedundancy, | 21 | redundancy: VideosRedundancy, |
@@ -186,7 +187,7 @@ export class VideosRedundancyScheduler extends AbstractScheduler { | |||
186 | const createdModel = await VideoRedundancyModel.create({ | 187 | const createdModel = await VideoRedundancyModel.create({ |
187 | expiresOn: this.buildNewExpiration(redundancy.minLifetime), | 188 | expiresOn: this.buildNewExpiration(redundancy.minLifetime), |
188 | url: getVideoCacheFileActivityPubUrl(file), | 189 | url: getVideoCacheFileActivityPubUrl(file), |
189 | fileUrl: video.getVideoRedundancyUrl(file, CONFIG.WEBSERVER.URL), | 190 | fileUrl: video.getVideoRedundancyUrl(file, WEBSERVER.URL), |
190 | strategy: redundancy.strategy, | 191 | strategy: redundancy.strategy, |
191 | videoFileId: file.id, | 192 | videoFileId: file.id, |
192 | actorId: serverActor.id | 193 | actorId: serverActor.id |
@@ -212,7 +213,7 @@ export class VideosRedundancyScheduler extends AbstractScheduler { | |||
212 | const createdModel = await VideoRedundancyModel.create({ | 213 | const createdModel = await VideoRedundancyModel.create({ |
213 | expiresOn: this.buildNewExpiration(redundancy.minLifetime), | 214 | expiresOn: this.buildNewExpiration(redundancy.minLifetime), |
214 | url: getVideoCacheStreamingPlaylistActivityPubUrl(video, playlist), | 215 | url: getVideoCacheStreamingPlaylistActivityPubUrl(video, playlist), |
215 | fileUrl: playlist.getVideoRedundancyUrl(CONFIG.WEBSERVER.URL), | 216 | fileUrl: playlist.getVideoRedundancyUrl(WEBSERVER.URL), |
216 | strategy: redundancy.strategy, | 217 | strategy: redundancy.strategy, |
217 | videoStreamingPlaylistId: playlist.id, | 218 | videoStreamingPlaylistId: playlist.id, |
218 | actorId: serverActor.id | 219 | actorId: serverActor.id |