mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
Fix tests
This commit is contained in:
parent
27d14308e5
commit
cb5f0b8959
2 changed files with 5 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue