1
0
Fork 0
peertube/server/lib/job-queue/handlers/video-redundancy.ts
2021-08-27 15:12:22 +02:00

17 lines
600 B
TypeScript

import { Job } from 'bull'
import { VideosRedundancyScheduler } from '@server/lib/schedulers/videos-redundancy-scheduler'
import { VideoRedundancyPayload } from '@shared/models'
import { logger } from '../../../helpers/logger'
async function processVideoRedundancy (job: 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
}