mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Reduce pending job waiting
This commit is contained in:
@@ -55,7 +55,7 @@ function getJobsListPaginationAndSort (options: {
|
||||
async function waitJobs (serversArg: ServerInfo[] | ServerInfo) {
|
||||
const pendingJobWait = process.env.NODE_PENDING_JOB_WAIT
|
||||
? parseInt(process.env.NODE_PENDING_JOB_WAIT, 10)
|
||||
: 500
|
||||
: 250
|
||||
|
||||
let servers: ServerInfo[]
|
||||
|
||||
@@ -115,7 +115,7 @@ async function waitJobs (serversArg: ServerInfo[] | ServerInfo) {
|
||||
}
|
||||
|
||||
if (pendingRequests) {
|
||||
await wait(1000)
|
||||
await wait(pendingJobWait)
|
||||
}
|
||||
} while (pendingRequests)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user