video-redundancy.ts 607 B

1234567891011121314151617
  1. import * as Bull from 'bull'
  2. import { logger } from '../../../helpers/logger'
  3. import { VideosRedundancyScheduler } from '@server/lib/schedulers/videos-redundancy-scheduler'
  4. import { VideoRedundancyPayload } from '@shared/models'
  5. async function processVideoRedundancy (job: Bull.Job) {
  6. const payload = job.data as VideoRedundancyPayload
  7. logger.info('Processing video redundancy in job %d.', job.id)
  8. return VideosRedundancyScheduler.Instance.createManualRedundancy(payload.videoId)
  9. }
  10. // ---------------------------------------------------------------------------
  11. export {
  12. processVideoRedundancy
  13. }