]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
More robust live ending job
authorChocobozzz <me@florianbigard.com>
Wed, 25 May 2022 13:18:29 +0000 (15:18 +0200)
committerChocobozzz <me@florianbigard.com>
Wed, 25 May 2022 13:18:29 +0000 (15:18 +0200)
server/lib/job-queue/handlers/video-live-ending.ts
server/tests/api/live/live-socket-messages.ts

index 79aa547ba10709fa4aa6034bd7b637992b99f35e..7607267f84f16f5e163abcccdfedb67925cbcf5b 100644 (file)
@@ -244,6 +244,10 @@ async function cleanupLiveAndFederate (options: {
     await cleanupNormalLive(video, streamingPlaylist)
   }
 
-  const fullVideo = await VideoModel.loadAndPopulateAccountAndServerAndTags(video.id)
-  return federateVideoIfNeeded(fullVideo, false, undefined)
+  try {
+    const fullVideo = await VideoModel.loadAndPopulateAccountAndServerAndTags(video.id)
+    return federateVideoIfNeeded(fullVideo, false, undefined)
+  } catch (err) {
+    logger.warn('Cannot federate live after cleanup', { videoId: video.id, err })
+  }
 }
index 7668ed5b9a29be728f93ab8c45cbb808d988733a..1669369c06230d0e80234045fc4a451c54e574ca 100644 (file)
@@ -18,7 +18,7 @@ import {
 
 const expect = chai.expect
 
-describe('Test live', function () {
+describe('Test live socket messages', function () {
   let servers: PeerTubeServer[] = []
 
   before(async function () {