]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/lib/redundancy.ts
Remove unnecessary actor existance check
[github/Chocobozzz/PeerTube.git] / server / lib / redundancy.ts
CommitLineData
c48e82b5
C
1import { VideoRedundancyModel } from '../models/redundancy/video-redundancy'
2import { sendUndoCacheFile } from './activitypub/send'
3import { Transaction } from 'sequelize'
4import { getServerActor } from '../helpers/utils'
5
6async function removeVideoRedundancy (videoRedundancy: VideoRedundancyModel, t?: Transaction) {
7 const serverActor = await getServerActor()
8
9 await sendUndoCacheFile(serverActor, videoRedundancy, t)
10
11 await videoRedundancy.destroy({ transaction: t })
12}
13
14// ---------------------------------------------------------------------------
15
16export {
17 removeVideoRedundancy
18}