Success on update "not in processing state" error
Or the job is never "ended"
This commit is contained in:
parent
0e718cb7b2
commit
4e98d843da
2 changed files with 19 additions and 5 deletions
|
@ -152,6 +152,9 @@ export class ProcessLiveRTMPHLSTranscoding {
|
|||
if (type === ServerErrorCode.RUNNER_JOB_NOT_IN_PROCESSING_STATE) {
|
||||
logger.info('Stopping transcoding as the job is not in processing state anymore')
|
||||
|
||||
this.sendSuccess()
|
||||
.catch(err => logger.error({ err }, 'Cannot send success'))
|
||||
|
||||
res()
|
||||
} else {
|
||||
logger.error({ err }, 'Cannot send update after added/deleted chunk, stopping live transcoding')
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||
import { expect } from 'chai'
|
||||
import { wait } from '@peertube/peertube-core-utils'
|
||||
import { HttpStatusCode, VideoPrivacy } from '@peertube/peertube-models'
|
||||
import { HttpStatusCode, RunnerJobState, VideoPrivacy } from '@peertube/peertube-models'
|
||||
import { areMockObjectStorageTestsDisabled } from '@peertube/peertube-node-utils'
|
||||
import {
|
||||
ObjectStorageCommand,
|
||||
PeerTubeServer,
|
||||
cleanupTests,
|
||||
createMultipleServers,
|
||||
doubleFollow,
|
||||
findExternalSavedVideo,
|
||||
makeRawRequest,
|
||||
ObjectStorageCommand,
|
||||
PeerTubeServer,
|
||||
setAccessTokensToServers,
|
||||
setDefaultVideoChannel,
|
||||
stopFfmpeg,
|
||||
|
@ -23,6 +22,7 @@ import { checkPeerTubeRunnerCacheIsEmpty } from '@tests/shared/directories.js'
|
|||
import { testLiveVideoResolutions } from '@tests/shared/live.js'
|
||||
import { PeerTubeRunnerProcess } from '@tests/shared/peertube-runner-process.js'
|
||||
import { SQLCommand } from '@tests/shared/sql-command.js'
|
||||
import { expect } from 'chai'
|
||||
|
||||
describe('Test Live transcoding in peertube-runner program', function () {
|
||||
let servers: PeerTubeServer[] = []
|
||||
|
@ -54,8 +54,19 @@ describe('Test Live transcoding in peertube-runner program', function () {
|
|||
})
|
||||
|
||||
await stopFfmpeg(ffmpegCommand)
|
||||
|
||||
await waitUntilLiveWaitingOnAllServers(servers, video.uuid)
|
||||
|
||||
const { data } = await servers[0].runnerJobs.list({ sort: '-createdAt' })
|
||||
|
||||
while (true) {
|
||||
const liveJob = data.find(d => d.type === 'live-rtmp-hls-transcoding')
|
||||
expect(liveJob).to.exist
|
||||
|
||||
if (liveJob.state.id === RunnerJobState.COMPLETED) break
|
||||
|
||||
await wait(500)
|
||||
}
|
||||
|
||||
await servers[0].videos.remove({ id: video.id })
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue