Reduce pending job waiting
This commit is contained in:
parent
d15aebf511
commit
4b91bc1525
|
@ -44,7 +44,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
PGUSER: peertube
|
PGUSER: peertube
|
||||||
PGHOST: localhost
|
PGHOST: localhost
|
||||||
NODE_PENDING_JOB_WAIT: 500
|
NODE_PENDING_JOB_WAIT: 250
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
|
@ -55,7 +55,7 @@ function getJobsListPaginationAndSort (options: {
|
||||||
async function waitJobs (serversArg: ServerInfo[] | ServerInfo) {
|
async function waitJobs (serversArg: ServerInfo[] | ServerInfo) {
|
||||||
const pendingJobWait = process.env.NODE_PENDING_JOB_WAIT
|
const pendingJobWait = process.env.NODE_PENDING_JOB_WAIT
|
||||||
? parseInt(process.env.NODE_PENDING_JOB_WAIT, 10)
|
? parseInt(process.env.NODE_PENDING_JOB_WAIT, 10)
|
||||||
: 500
|
: 250
|
||||||
|
|
||||||
let servers: ServerInfo[]
|
let servers: ServerInfo[]
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ async function waitJobs (serversArg: ServerInfo[] | ServerInfo) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pendingRequests) {
|
if (pendingRequests) {
|
||||||
await wait(1000)
|
await wait(pendingJobWait)
|
||||||
}
|
}
|
||||||
} while (pendingRequests)
|
} while (pendingRequests)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue