ActivityPub-federated video streaming platform using P2P directly in your web browser
Reduce pending job waiting
Chocobozzz4b91bc1525e8
diff --git a/.github/workflows/test.yml b/.github/workflows/test.ymlindex 442317ce2b..a1edde1ef0 100644--- a/.github/workflows/test.yml+++ b/.github/workflows/test.yml@@ -44,7 +44,7 @@ jobs:env:PGUSER: peertubePGHOST: localhost- NODE_PENDING_JOB_WAIT: 500+ NODE_PENDING_JOB_WAIT: 250steps:- uses: actions/checkout@v2diff --git a/shared/extra-utils/server/jobs.ts b/shared/extra-utils/server/jobs.tsindex 704929bd4f..763374e030 100644--- a/shared/extra-utils/server/jobs.ts+++ b/shared/extra-utils/server/jobs.ts@@ -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+ : 250let servers: ServerInfo[]@@ -115,7 +115,7 @@ async function waitJobs (serversArg: ServerInfo[] | ServerInfo) {}if (pendingRequests) {- await wait(1000)+ await wait(pendingJobWait)}} while (pendingRequests)}