aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/server/jobs.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-05-07 14:48:39 +0200
committerChocobozzz <chocobozzz@cpy.re>2021-05-07 15:42:23 +0200
commit4b91bc1525e89643c575cac6557c86f64e657aa2 (patch)
tree95fb52c26a18bd44c183aa5cf801ea34fc51a336 /shared/extra-utils/server/jobs.ts
parentd15aebf511f92d19d3ef9b196e54525ec6c3a4cd (diff)
downloadPeerTube-4b91bc1525e89643c575cac6557c86f64e657aa2.tar.gz
PeerTube-4b91bc1525e89643c575cac6557c86f64e657aa2.tar.zst
PeerTube-4b91bc1525e89643c575cac6557c86f64e657aa2.zip
Reduce pending job waiting
Diffstat (limited to 'shared/extra-utils/server/jobs.ts')
-rw-r--r--shared/extra-utils/server/jobs.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/shared/extra-utils/server/jobs.ts b/shared/extra-utils/server/jobs.ts
index 704929bd4..763374e03 100644
--- a/shared/extra-utils/server/jobs.ts
+++ b/shared/extra-utils/server/jobs.ts
@@ -55,7 +55,7 @@ function getJobsListPaginationAndSort (options: {
55async function waitJobs (serversArg: ServerInfo[] | ServerInfo) { 55async function waitJobs (serversArg: ServerInfo[] | ServerInfo) {
56 const pendingJobWait = process.env.NODE_PENDING_JOB_WAIT 56 const pendingJobWait = process.env.NODE_PENDING_JOB_WAIT
57 ? parseInt(process.env.NODE_PENDING_JOB_WAIT, 10) 57 ? parseInt(process.env.NODE_PENDING_JOB_WAIT, 10)
58 : 500 58 : 250
59 59
60 let servers: ServerInfo[] 60 let servers: ServerInfo[]
61 61
@@ -115,7 +115,7 @@ async function waitJobs (serversArg: ServerInfo[] | ServerInfo) {
115 } 115 }
116 116
117 if (pendingRequests) { 117 if (pendingRequests) {
118 await wait(1000) 118 await wait(pendingJobWait)
119 } 119 }
120 } while (pendingRequests) 120 } while (pendingRequests)
121} 121}