From 4b91bc1525e89643c575cac6557c86f64e657aa2 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 7 May 2021 14:48:39 +0200 Subject: [PATCH] Reduce pending job waiting --- .github/workflows/test.yml | 2 +- shared/extra-utils/server/jobs.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 442317ce2..a1edde1ef 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,7 +44,7 @@ jobs: env: PGUSER: peertube PGHOST: localhost - NODE_PENDING_JOB_WAIT: 500 + NODE_PENDING_JOB_WAIT: 250 steps: - uses: actions/checkout@v2 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: { 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) } -- 2.41.0