1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Fix tests

This commit is contained in:
Chocobozzz 2025-02-12 10:33:34 +01:00
parent 27d14308e5
commit cb5f0b8959
No known key found for this signature in database
GPG key ID: 583A612D890159BE
2 changed files with 5 additions and 2 deletions

View file

@ -7,10 +7,11 @@ async function waitJobs (
serversArg: PeerTubeServer[] | PeerTubeServer,
options: {
skipDelayed?: boolean // default false
skipFailed?: boolean // default false
runnerJobs?: boolean // default false
} = {}
) {
const { skipDelayed = false, runnerJobs = false } = options
const { skipDelayed = false, skipFailed = false, runnerJobs = false } = options
const pendingJobWait = process.env.NODE_PENDING_JOB_WAIT
? parseInt(process.env.NODE_PENDING_JOB_WAIT, 10)
@ -69,6 +70,8 @@ async function waitJobs (
.then(({ data }) => {
for (const job of data) {
if (job.state.id !== RunnerJobState.COMPLETED) {
if (skipFailed && job.state.id === RunnerJobState.ERRORED) continue
pendingRequests = true
if (process.env.DEBUG) {