aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-05-25 15:18:29 +0200
committerChocobozzz <me@florianbigard.com>2022-05-25 15:18:29 +0200
commitc8fdfab0e36cc7324c61710009bf334e836485d9 (patch)
tree4406a2ee9ae5c8c54e2059d8918848ed269365cc
parent5333788c08ab6152303829d4624774b5d788ff40 (diff)
downloadPeerTube-c8fdfab0e36cc7324c61710009bf334e836485d9.tar.gz
PeerTube-c8fdfab0e36cc7324c61710009bf334e836485d9.tar.zst
PeerTube-c8fdfab0e36cc7324c61710009bf334e836485d9.zip
More robust live ending job
-rw-r--r--server/lib/job-queue/handlers/video-live-ending.ts8
-rw-r--r--server/tests/api/live/live-socket-messages.ts2
2 files changed, 7 insertions, 3 deletions
diff --git a/server/lib/job-queue/handlers/video-live-ending.ts b/server/lib/job-queue/handlers/video-live-ending.ts
index 79aa547ba..7607267f8 100644
--- a/server/lib/job-queue/handlers/video-live-ending.ts
+++ b/server/lib/job-queue/handlers/video-live-ending.ts
@@ -244,6 +244,10 @@ async function cleanupLiveAndFederate (options: {
244 await cleanupNormalLive(video, streamingPlaylist) 244 await cleanupNormalLive(video, streamingPlaylist)
245 } 245 }
246 246
247 const fullVideo = await VideoModel.loadAndPopulateAccountAndServerAndTags(video.id) 247 try {
248 return federateVideoIfNeeded(fullVideo, false, undefined) 248 const fullVideo = await VideoModel.loadAndPopulateAccountAndServerAndTags(video.id)
249 return federateVideoIfNeeded(fullVideo, false, undefined)
250 } catch (err) {
251 logger.warn('Cannot federate live after cleanup', { videoId: video.id, err })
252 }
249} 253}
diff --git a/server/tests/api/live/live-socket-messages.ts b/server/tests/api/live/live-socket-messages.ts
index 7668ed5b9..1669369c0 100644
--- a/server/tests/api/live/live-socket-messages.ts
+++ b/server/tests/api/live/live-socket-messages.ts
@@ -18,7 +18,7 @@ import {
18 18
19const expect = chai.expect 19const expect = chai.expect
20 20
21describe('Test live', function () { 21describe('Test live socket messages', function () {
22 let servers: PeerTubeServer[] = [] 22 let servers: PeerTubeServer[] = []
23 23
24 before(async function () { 24 before(async function () {