diff options
author | kontrollanten <6680299+kontrollanten@users.noreply.github.com> | 2021-11-08 04:20:04 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-11-09 15:00:21 +0100 |
commit | 4e29f4fe23b413cc8c55ac0d8373f36bcd60b47a (patch) | |
tree | c9e63dac52672d46cbf0072dc35e396dca61079c /server/lib/video-state.ts | |
parent | 9c391612038cd48cfeb2315dcbb8feddcf877d94 (diff) | |
download | PeerTube-4e29f4fe23b413cc8c55ac0d8373f36bcd60b47a.tar.gz PeerTube-4e29f4fe23b413cc8c55ac0d8373f36bcd60b47a.tar.zst PeerTube-4e29f4fe23b413cc8c55ac0d8373f36bcd60b47a.zip |
video: add video stranscoding_failed state
Diffstat (limited to 'server/lib/video-state.ts')
-rw-r--r-- | server/lib/video-state.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/server/lib/video-state.ts b/server/lib/video-state.ts index d5bbbec43..2260e90f5 100644 --- a/server/lib/video-state.ts +++ b/server/lib/video-state.ts | |||
@@ -79,11 +79,18 @@ async function moveToExternalStorageState (video: MVideoFullLight, isNewVideo: b | |||
79 | } | 79 | } |
80 | } | 80 | } |
81 | 81 | ||
82 | function moveToFailedState (video: MVideoFullLight) { | ||
83 | return sequelizeTypescript.transaction(async t => { | ||
84 | await video.setNewState(VideoState.TRANSCODING_FAILED, false, t) | ||
85 | }) | ||
86 | } | ||
87 | |||
82 | // --------------------------------------------------------------------------- | 88 | // --------------------------------------------------------------------------- |
83 | 89 | ||
84 | export { | 90 | export { |
85 | buildNextVideoState, | 91 | buildNextVideoState, |
86 | moveToExternalStorageState, | 92 | moveToExternalStorageState, |
93 | moveToFailedState, | ||
87 | moveToNextState | 94 | moveToNextState |
88 | } | 95 | } |
89 | 96 | ||