2020-01-10 04:11:28 -05:00
|
|
|
import * as Bull from 'bull'
|
|
|
|
import { logger } from '../../../helpers/logger'
|
|
|
|
import { VideosRedundancyScheduler } from '@server/lib/schedulers/videos-redundancy-scheduler'
|
2020-04-23 03:32:53 -04:00
|
|
|
import { VideoRedundancyPayload } from '@shared/models'
|
2020-01-10 04:11:28 -05:00
|
|
|
|
|
|
|
async function processVideoRedundancy (job: Bull.Job) {
|
|
|
|
const payload = job.data as VideoRedundancyPayload
|
|
|
|
logger.info('Processing video redundancy in job %d.', job.id)
|
|
|
|
|
|
|
|
return VideosRedundancyScheduler.Instance.createManualRedundancy(payload.videoId)
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
export {
|
|
|
|
processVideoRedundancy
|
|
|
|
}
|