1
0
Fork 0
peertube/server/lib/job-queue/handlers/video-redundancy.ts

18 lines
600 B
TypeScript
Raw Normal View History

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