mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 18:29:27 +02:00
Basic video redundancy implementation
This commit is contained in:
parent
a651038487
commit
c48e82b5e0
77 changed files with 1667 additions and 287 deletions
18
server/lib/redundancy.ts
Normal file
18
server/lib/redundancy.ts
Normal file
|
@ -0,0 +1,18 @@
|
|||
import { VideoRedundancyModel } from '../models/redundancy/video-redundancy'
|
||||
import { sendUndoCacheFile } from './activitypub/send'
|
||||
import { Transaction } from 'sequelize'
|
||||
import { getServerActor } from '../helpers/utils'
|
||||
|
||||
async function removeVideoRedundancy (videoRedundancy: VideoRedundancyModel, t?: Transaction) {
|
||||
const serverActor = await getServerActor()
|
||||
|
||||
await sendUndoCacheFile(serverActor, videoRedundancy, t)
|
||||
|
||||
await videoRedundancy.destroy({ transaction: t })
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export {
|
||||
removeVideoRedundancy
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue