mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 18:29:27 +02:00
17 lines
619 B
TypeScript
17 lines
619 B
TypeScript
import { Job } from 'bullmq'
|
|
import { VideosRedundancyScheduler } from '@server/lib/schedulers/videos-redundancy-scheduler.js'
|
|
import { VideoRedundancyPayload } from '@peertube/peertube-models'
|
|
import { logger } from '../../../helpers/logger.js'
|
|
|
|
async function processVideoRedundancy (job: Job) {
|
|
const payload = job.data as VideoRedundancyPayload
|
|
logger.info('Processing video redundancy in job %s.', job.id)
|
|
|
|
return VideosRedundancyScheduler.Instance.createManualRedundancy(payload.videoId)
|
|
}
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
export {
|
|
processVideoRedundancy
|
|
}
|